加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > PHP > 正文

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

发布时间:2020-05-24 21:35:38 所属栏目:PHP 来源:互联网
导读:PHP在线解压缩Zip 文件函数代码,需要在线zip解压的朋友可以参考下。

<div class="codetitle"><a style="CURSOR: pointer" data="79088" class="copybut" id="copybut79088" onclick="doCopy('code79088')"> 代码如下:<div class="codebody" id="code79088">
/**
@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压缩 在线对文件进行压缩的函数

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读