//解压ZIP压缩文件(PHP代码函数)
//代码来源:Monxin ./config/functions.php
function extract_zip($path,$del_zip=true){
$zip=new ZipArchive;
if ($zip->open($path)=== TRUE) {
$temp_dir='./temp_dir/'.md5(time().rand(999,9999));
$zip->extractTo($temp_dir);
$zip->close();
if($del_zip){unlink($path);}
return $temp_dir;
} else {
return false;
}
}
解压ZIP压缩文件(PHP代码函数)
最新推荐文章于 2022-10-18 10:45:55 发布