Home >Backend Development >PHP Tutorial >Making zip compression program with PHP_PHP tutorial
I just found a category online. Click to download the class file (zip compressed file, 2.25K)
$z = new PHPZip(); // Create a new zip class
Method 1:
$z -> Zip("", "out1.zip"); //Add all files in the current directory and subdirectories
Method 2:
$files=array('1.txt','gb.txt');
$files []='5.txt';
$z -> Zip($files, "out2.zip"); //Add file list
Method three:
$z -> Zip( "/usr/local/sext/", "out3.zip"); //Add the specified directory