Anyway, whenever I try to use the ZipArchive class, I get "Fatal error: Class 'ZipArchive' not found." Oh, of course! I didn't add the DLL in php.ini
But I did. phpinfo even says I did. It also says zlib is working fine, too. What gives? I can access the standard zip functions, but anything having to do with the class returns that message. Here's my code:
Code: Select all
<?php
$images = $_POST['images'];
$zip = new ZipArchive();
$filename = "./images.zip";
if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) {
exit("cannot open $filename\n");
}
foreach($images as $curimage)
{
$tmp = pathinfo($curimage);
$zip->addFile($tmp[basename]);
}
$zip->close();
?>So what gives? Did I configure something wrong? Did I type something wrong? Thank you in advance for any help. And if it is just a dumb configuration error, feel free to berate me for wasting your time.