I've been trying to create a Zip file using PHP and the ZipArchive, but despite checking that each file I add is readable, writable, and exists, zip->close()
returns false. If I call zip->numFiles
, it returns the number I suspect, but file_exists($zipname)
still returns false. Immediately after adding a file, $zip->getStatusString()
returns "No Error". If I call $zip->getStatusString()
right after calling zip->close()
it returns "Failure to create temporary file: Permission denied".
I've checked this link Zip->close() returns false despite checks, and have ensured that the $file
I'm making checks for is the exact same as the $file
I'm adding to the $zip
.
Is there something I'm overlooking?