首页 > Web开发 > 详细

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

时间:2016-01-31 00:40:52      阅读:170      评论:0      收藏:0      [点我收藏+]
复制代码 代码如下:

/**********************
*@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 Zip解压 文件在线解压缩的函数代码

原文:http://www.jb51.net/article/23637.htm

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!