您的位置:首页 > 编程语言 > PHP开发

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

2010-05-26 00:00 776 查看
/********************** 
*@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压缩 在线对文件进行压缩的函数
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: