PHP zip file class
Submitted by xqus on Wed, 05/09/2007 - 20:03
I'm working on a Drupal module (can't say what) that needs to create a archive. I landed on ZIP, because it's the easiest to implement without requiring any external libs.
I searched around and found this, and with a few improvements I ended up with this: http://xqus.com/tools/class.zipfile.phps
The following changes were made:
- Changed the name of the output method to save
- Added some error checking in the save method
- Made the save method return boolean
- Added a check to see if the $files param to addFiles in an array
- Changed the way the addFiles method reads file contents
- Made the addFiles method return boolean
- Made a output method to output the zipfile directly to the browser
Can you re-submit your code, or even better create a project in Drupal?
- reply
Submitted by Amitai (not verified) on Mon, 06/02/2008 - 13:21.http://xqus.com/tools/class.zipfile.phps
- reply
Submitted by xqus on Sat, 07/12/2008 - 20:59.Post new comment