⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upload.php

📁 ZIP文件上传后自动解压程序源代码
💻 PHP
字号:



#upload.php 
<table border='0' > 
<form ENCTYPE="multipart/form-data" action="upsave.php" method="post"> 

<tr> 
<td>如果是*.ZIP的文件会被自动解压缩<br> 
<INPUT NAME="MyFile" TYPE="File" size="50"> 
</td> 
</tr> 
<tr> 
<td colspan='2' align="center"> 
<input type="Submit" value=" 上传 " class=iwhite> 
<input type="reset" value=" 重填 " class=iwhite> 
</td> 
</tr> 
</table> 



</body> 
</html> 


<? 
//upsave.php 
//保存上传的文件 
$filename="$MyFile_name"; 
copy($MyFile,"$filename"); 
unlink($MyFile); 

//判断是否是ZIP文件 
$expand_name=explode(".",$filename); 
if($expand_name[1] == "zip" or $expand_name[1] == "ZIP") 
{ 
$str="pkunzip.exe -e $filename "; 
exec($str); 
unlink($filename); 
} 

?> 
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -