Home Unzip a file with PHP

    Unzip a file with PHP


    There’s a ton of really good libraries for handling the zipping and unzipping of files. The following solution is super-simple in nature and uses PHP’s ZIP extension that “enables you to transparently read or write ZIP compressed archives and the files inside them”. The same class can be used to zip files and perform a number of other operations.

    To zip a file, look at the ZipArchive::addFile documentation.

    Short URL for this post: http://shor.tt/1XHq