DamienRoche Posted September 14, 2008 Share Posted September 14, 2008 I am trying to create a zip archive. Currently, I have: $zip = new ZipArchive(); $zipname = "$newcore.zip"; if ($zip->open($zipname, ZIPARCHIVE::CREATE)!==TRUE) { exit("cannot open <$zipname>\n"); } $zip->addFile($absolute_path, $passportfile); $zip->close(); The $absolute_path is where the passport file is on the server. The passport file uploads fine. Then I just want to put this passport file into a zip. No errors are coming up, though I'm not using php error reporting. But that doesn't matter right now. All I want to know is where should the zip be created? and can I set the default path? Thanks. Link to comment https://forums.phpfreaks.com/topic/124178-creating-zip-archive-set-default-path/ Share on other sites More sharing options...
DamienRoche Posted September 14, 2008 Author Share Posted September 14, 2008 I turned on error reporting, though I am getting errors, I'm not getting anything on this..? Link to comment https://forums.phpfreaks.com/topic/124178-creating-zip-archive-set-default-path/#findComment-641129 Share on other sites More sharing options...
DamienRoche Posted September 14, 2008 Author Share Posted September 14, 2008 I've been messing about with this, but I can't even find any zip files at all! I don't get it. I definitely have the required version of php. No errors, nothing. Any ideas? Link to comment https://forums.phpfreaks.com/topic/124178-creating-zip-archive-set-default-path/#findComment-641150 Share on other sites More sharing options...
PFMaBiSmAd Posted September 14, 2008 Share Posted September 14, 2008 though I'm not using php error reporting. But that doesn't matter right now. It does matter. When learning php (or trying something new), developing php code, or debugging php code, you should have error_reporting set to E_ALL and display_errors set to ON in your php.ini (stop and start your web server to get any changes made to php.ini to take effect) to get php to help you. I turned on error reporting, though I am getting errors, I'm not getting anything on this..? How did you turn on error reporting (show the settings you used) and if you did this in your php.ini, did you stop and start your web server to get any changes made to php.ini to take effect? Link to comment https://forums.phpfreaks.com/topic/124178-creating-zip-archive-set-default-path/#findComment-641215 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.