I am trying to run this code
$files = array('readme.txt', 'test.html', 'image.gif');
$zip = new ZipFile;
$zip->open('file.zip', ZipArchive::CREATE);
foreach ($files as $file) {
$zip->addFile($file);
}
$zip->close();
header('Content-Type: application/zip');
header('Content-disposition: attachment; filename=filename.zip');
header('Content-Length: ' . filesize($zipfilename));
readfile($zipname);
And realized I had to install the PECL zip entension, which I believe I did corectly as once it was comopleted, it added this to my phpinfo();
Even after installing this extension, I'm still getting this message.
Fatal error: Class 'ZipFile' not found in