PHP在线打包程序代码.PHP
if(is_array($_REQUEST[dfile]))
{
$dodozip = new PHPzip;
if($_REQUEST["file_type"] != NULL)
$dodozip -> SetFileFilter($_REQUEST["file_type"]);
if($dodozip -> startfile("$_REQUEST[todir]$_REQUEST[zipname]"))
{
echo "正在添加压缩文件...<br><br>";
$filenum = 0;
foreach($_REQUEST[dfile] as $file)
{
if(is_file($file))
{
if(!empty($dodozip -> filefilters))
if (!in_array(end(explode(".",$file)), $dodozip -> filefilters))
continue;
echo "<font face=\"wingdings\" size=\"5\">2</font> $file<br>";
}
else
{
echo "<font face=\"wingdings\" size=\"5\">0</font> $file<br>";
}
$filenum = listfiles($file);
}
$dodozip -> createfile();
echo "<br>压缩完成,共添加 $filenum 个文件.<br><a href='$_REQUEST[todir]$_REQUEST[zipname]' _fcksavedurl='$_REQUEST[todir]$_REQUEST[zipname]'>$_REQUEST[todir]$_REQUEST[zipname] (".num_bitunit(filesize("$_REQUEST[todir]$_REQUEST[zipname]")).")</a>";
}
else
{
echo "$_REQUEST[todir]$_REQUEST[zipname] 不能写入,请检查路径或权限是否正确.<br>";
}
}.
└── 找例子网_php在线打包程序.php
0 directories, 1 file
评论