News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Web Development Blog:
Tutorial Create a zip file from folders on the fly
September 28, 2007 @ 10:24:00

On the Web Development Blog, there's a quick tutorial on creating dynamic zip files via a helpful little class:

For a future project I needed these days some easy to use zip or gzip class to create a zip file from files / folders inside a specified directory. [...] I tested two [other] scripts before and must say that this script works great for single files if you add them manually. To compress a whole directory with an unknown number of files into one zip file I created some class extension to get this job done.

In his class, the get_file_from_folder method is called with the directory and the file to load them into. This loops through the files, pulling them all (directories and all) into the new zip file. An example of the class' use is also included.

0 comments voice your opinion now!
zip file folder directory automatic class example zip file folder directory automatic class example


blog comments powered by Disqus

Similar Posts

DevShed: PHP Closures as View Helpers: Lazy-Loading File Data

DevShed: Handling File Data with PHP (Reading & Seeking)

PHPEasy.co.uk: Design Patterns - The Singleton Pattern

Padraic Brady's Blog: Zend Framework Blog Tutorial - Part 7: Authorisation with Zend_Acl & Styling

Johannes Schluter's Blog: DTraceing around


Community Events

Don't see your event here?
Let us know!


podcast interview voicesoftheelephpant example extension laravel introduction opinion framework language series list php7 library api laravel5 release version community security

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework