Home > Backend Development > PHP Tutorial > 用PHP制作zip压缩程序_PHP

用PHP制作zip压缩程序_PHP

WBOY
Release: 2016-06-01 12:33:03
Original
834 people have browsed it

刚在网上找的一个类。点击下载类文件(zip压缩文件,2.25K)

$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