compress/archive folder using php script
问题 Is there a way to compress/archive a folder in the server using php script to .zip or .rar or to any other compressed format, so that on request we could archive the folder and then give the download link Thanks in advance 回答1: Here is an example: <?php // Adding files to a .zip file, no zip file exists it creates a new ZIP file // increase script timeout value ini_set('max_execution_time', 5000); // create object $zip = new ZipArchive(); // open archive if ($zip->open('my-archive.zip',