Created
February 7, 2014 22:20
-
-
Save FernE97/8873182 to your computer and use it in GitHub Desktop.
Extract zip files from server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( $_GET['file'] ) { | |
exec( 'unzip '.$_GET['file'] ); | |
} | |
else { | |
echo 'Please pass the filename you would like to extract. ex: '.$_SERVER['SCRIPT_URL'].'?file=content.zip'; | |
} | |
// www.example.com/tgz_extractor.php?file=content.tgz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment