Tags
PHP, unzip, zip, ziparchive
Sometime we need to extract a file on the server, say you don’t have access to shell and you want to extract a zip file, just put this to a php file and upload and run
$zipObj = new ZipArchive; $file = $zipObj->open(’zip_file_name.zip’); if ($file == TRUE) { $zipObj->extractTo('extract_directory/'); $zipObj->close(); echo 'Unzip Successfully'; } else { echo 'Failed to unzip'; }
Its very simple and available idea everywhere, i jut wrote for note
Done!!! 🙂
Unfortunately I am having trouble with your RSS . Don’t know why Fail to subscribe to it. Is there anybody else experiencing similar rss problem? Anybody who knows please respond.
This is really nice and helpful 🙂
You can also check
http://www.7tech.co.in/php/how-to-unzip-a-zip-file-in-php-unzip/
This is also helpful