标签:php
include_once(‘pclzip.lib.php‘);
$archive = new PclZip(‘archive.zip‘);
$v_list = $archive->create(‘file.txt,data/text.txt,folder‘);
if ($v_list == 0) {
die("Error : ".$archive->errorInfo(true));
}
require_once(‘pclzip.lib.php‘);
$archive = new PclZip(‘archive.zip‘);
if ($archive->extract() == 0) {
die("Error : ".$archive->errorInfo(true));
}
require_once(‘pclzip.lib.php‘);
$archive = new PclZip(‘archive.zip‘);
if ($archive->extract(PCLZIP_OPT_BY_NAME, $fiel_list) == 0) {
die("Error : ".$archive->errorInfo(true));
}
标签:php
原文地址:http://blog.csdn.net/qlong_dd/article/details/44201545