Mar 23, 2010
Zip with PhpEvery time when you search for the code "How to create zip file with php" OR "Zipping with Php", You will easily found a class or a long code snippet. I think If your are searching for the basic idea, You are at right place.
<?php $zip = new ZipArchive(); // use ZIPARCHIVE::OVERWRITE if you want to owerwrite files $zip->open('my.zip',ZIPARCHIVE::CREATE); // add file names, comma separated $zip->addFile('file1.txt','file2.php'); $zip->close(); ?>
If this article helped you and you are feeling very Thankful. You can send me Bitcoins
By : Motyar+ @motyar