Unzip files in your account

holhostcom

New member
Once uploaded , you can unzip the files following these steps :
1. Create file called unzip.php into the same folder as the archive.
2. Copy/paste the following content :
<? exec("unzip myfile.zip"); ?>
3. Replace myfile.zip with the name of your file
4. Open yourdomain.com/path_to/unzip.php in a browser
You will haev the .zip extracted into the same folder as the archive.
 
Thanks for posting this, Its a very handy way to unzip files.

What control panel is this used for? Don't cPanel come with a feature that you can just unzip it without doing any of this?
 
This uses PHP to utilize the "unzip" command, and is not dependent on your Control Panel.

Your PHP should have exec() function allowed in order to run this though.

Yeah, cPanel has this built in. I love it! :D
 
I think cpanel's file manager is a better way to accomplish this. You can then change permissions on files too if needed. This is a great way to think outside the box though.

Mark
 
Back
Top