mrsburnside Posted August 16, 2010 Share Posted August 16, 2010 This code works: // create object $zip = new ZipArchive(); // open archive if ($zip->open('./download/zipfile.zip', ZIPARCHIVE::CREATE) !== TRUE) { die ("Could not open archive"); } but, I want to create the name of the zip file dynamically. The following code does not work ... doesn't give me an error, just doesn't create the zip file: / / create object $zip = new ZipArchive(); $thisTime = time(); // open archive $thisZip = './download/'.$thisTime.'_download.zip'; $thisZip_b = $thisTime.'_download.zip'; if ($zip->open($thisZip, ZIPARCHIVE::CREATE) !== TRUE) { die ("Could not open archive"); } thanks in advance oh wise ones. mrsburnside Quote Link to comment Share on other sites More sharing options...
btherl Posted August 16, 2010 Share Posted August 16, 2010 The next things I would try are: 1. Can I create a file with that name manually? 2. Can I create a file called "1281999572_download.zip" without generating it automatically with time(), instead using a static string? 3. If it still doesn't work, try filenames with different lengths and with different character sets in the filenames. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.