Hi,
anyone using the PHP built-in zip features? having some problems trying to get it to archive files using the addGlob function.
// init code..
$zip->addFile() ; WORKS
// 1st addGlob: WORKS
$campaign_documents = "./".$dirs['campaign_documents'];
$options = array('remove_all_path' => TRUE);
$res = $zip->addGlob($campaign_documents."*", GLOB_BRACE, $options);
// 2nd addGlob FAILS
$custom_letters = "./".$dirs['custom_letters'];
$options = array('remove_all_path' => FALSE);
$res1 = $zip->addGlob($custom_letters."*", GLOB_BRACE, $options);
// this DOES NOT work
Warning: ZipArchive::close(): Can't open file: Permission denied in on line 3362 which is $zip->close();
they are both identical except that the 2nd addGlob has sub-folders with files in them, where as the 1st are only files.
they are both at the identical sub-level
the path looks like
1/custom-letters/5/108/invite.5.108.pdf
1/custom-letters/5/2263/invite.5.2263.pdf
1/custom-letters/5/2266/invite.5.2266.pdf
etc…
$custom_letters builds out to: uploads/ID/custom-letters/ID1/ID2
checking $res1 - it displays only the folder paths, where as the 1st addGlob showed the folder and filenames.
not sure why this is failing, any insights appreciated.