News Feed
Sections




News Archive
feed this:

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

Rob Allen:
Creating a zip file with PHP's ZipArchive
January 15, 2014 @ 15:40:59

Rob Allen has a new post to his site today showing you how to create a ZIP file with the help of PHP's ZipArchive functionality. The latest versions would need to be installed as an extension (PECL) if they're not already there, but it makes creating the archives a lot simpler.

I recently had a requirement to create a zip file from a number of files created within my application. As it has been years since I last had this problem, I had a look around and discovered that PHP 5.2 has the ZipArchive class that makes this easy. ZipArchive is fully featured, but as I just wanted to create a simple zip file.

All it requires is a few short lines of code - one to open the archive itself, some to add in the files to compress down and another to close and create the file. It's a pretty simple process using this handy extension. Rob also included a bit of sample code showing how to send it out for download with the correct headers.

0 comments voice your opinion now!
zip file archive create tutorial ziparchive

Link: http://akrabat.com/php/creating-a-zip-file-with-phps-ziparchive

Pierre-Alain Joye's Blog:
Zip-1.6.0, PHP 5.2.0 and ZipCode
July 28, 2006 @ 06:14:14

Pierre-Alain Joye has a new note on his blog today about the release of a new version of his Zip package and his efforts to get it included in the upcoming PHP 5.2.0.

I released zip-1.6.0 on wednesday. This release contains no bug fixes and no new feature. In the past weeks, many zip users asked me when I will bundle it in PHP. I cannot bundle extensions without asking the internals list. I steped in and ask to bundle it in 5.2.0, it was hard but finally sucessful.

For the inclusion, he's change the name of the archive to "ZipArchive" from just "Zip" in an effort to clarify what the package is for (archiving versus zip code related functionality).

0 comments voice your opinion now!
zip archive package bundled php5.2.0 ziparchive zip archive package bundled php5.2.0 ziparchive



Community Events





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


application interview package release laravel podcast community series symfony version security framework install opinion library language introduction tool voicesoftheelephpant composer

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