Home > Backend Development > PHP Tutorial > 一个zip压缩的类,用起来很简单_PHP

一个zip压缩的类,用起来很简单_PHP

WBOY
Release: 2016-06-01 12:27:09
Original
906 people have browsed it

刚在网上找的
$z = new PHPZip(); //新建立一个zip的类

方法一:
$z -> Zip("", "out1.zip"); //添加当前目录和子目录下的所有档案


方法二:
$files=array('1.txt','gb.txt');
$files[]='5.txt';
$z -> Zip($files, "out2.zip"); //添加文件列表


方法三:
$z -> Zip("/usr/local/sext/", "out3.zip"); //添加指定目录

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template