
Karen - 2011-12-01 12:45:56 -
In reply to message 1 from Karen
Correction: I thought I had corrected the problem but I haven't. addFile still isn't working. Any idea what I'm doing wrong? (See code below)
$zip = new Zip();
foreach ($tutorials as $tutorial) {
$file = PDF_PATH.$tutorial['slug'].'.pdf';
if (file_exists($file)) {
$zip->addFile(file_get_contents($file), $file);
}
}
$zip->sendZip('test.zip');