Answers for "lDownload multiple files as a zip-file using php"

PHP
0

lDownload multiple files as a zip-file using php

$files = array('readme.txt', 'test.html', 'image.gif');
$zipname = 'file.zip';
$zip = new ZipArchive;
$zip->open($zipname, ZipArchive::CREATE);
foreach ($files as $file) {
  $zip->addFile($file);
}
$zip->close();
Posted by: Guest on August-20-2021

Code answers related to "lDownload multiple files as a zip-file using php"

Browse Popular Code Answers by Language