手机
当前位置:查字典教程网 >编程开发 >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中关于socket的系列函数总结

PHP文本数据库的搜索方法

PHP curl伪造IP地址和header信息代码实例

我的论坛源代码(三)

PHP使用mysqldump命令导出数据库

用PHP实现文件上传

PHP使用flock实现文件加锁的方法

PHP中上传大体积文件时需要的设置

PHP中的traits实现代码复用使用实例

精品推荐
分类导航