手机
当前位置:查字典教程网 >编程开发 >php教程 >PHP Zip解压 文件在线解压缩的函数代码
PHP Zip解压 文件在线解压缩的函数代码
摘要:复制代码代码如下:/***********************@file-pathtozipfile*@destination-dest...

复制代码 代码如下:

/**********************

*@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解压 文件在线解压缩的函数代码】相关文章:

PHP滚动日志的代码实现

PHP SPL标准库中的常用函数介绍

我的论坛源代码(五)

PHP时间和日期函数详解

使用PHP维护文件系统

如何使用PHP中的字符串函数

php计算给定时间之前的函数用法实例

我的论坛源代码(七)

PHP session文件独占锁引起阻塞问题解决方法

我的论坛源代码(十)

精品推荐
分类导航