Quantcast
Channel: PHPDeveloper.org
Viewing all articles
Browse latest Browse all 10

NETTUTS.com: How to Open Zip Files with PHP

$
0
0

The NETTUTS.com site has a new tutorial/screencast posted looking at their method for opening up uploaded zip files with PHP:

ThemeForest has a nice feature; It allows the authors to upload zip files containing screenshots of their themes. A script then extracts these files and displays the images accordingly. Though I doubt that the developers used PHP to accomplish this task...that's what we're going to use!

They create a simple form with one field - a file input - and write some basic PHP around it. The script ensures that it was a zip file that was uploaded (based on the mime type) and passes it through a ZipArchive class to do the hard work. This class and the rest of the source can be downloaded from the site.


Viewing all articles
Browse latest Browse all 10

Trending Articles