网络编程 
首页 > 网络编程 > 浏览文章

PHP Zip解压 文件在线解压缩的函数代码

(编辑:jimmy 日期: 2024/9/25 浏览:3 次 )
复制代码 代码如下:
/**********************
*@file - path to zip file
*@destination - destination directory for unzipped files
*/
function unzip_file($file, $destination){
// create object
$zip = new ZipArchive() ;
// open archive
if ($zip->open($file) !== TRUE) {
die ('Could not open archive');
}
// extract contents to destination directory
$zip->extractTo($destination);
// close archive
$zip->close();
echo 'Archive extracted to directory';
}

PHP Zip压缩 在线对文件进行压缩的函数
上一篇:PHP similar_text 字符串的相似性比较函数
下一篇:PHP Zip压缩 在线对文件进行压缩的函数
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap