First make your folder to zip. Then upload this zip into the webserver root directory. Next upload the following script into the same root directory to extract your zip file.
PHP script - zipextractor.php
- Code: Select all
< ?php
$zip = new ZipArchive;
if ($zip->open('yourzipfilename.zip') === TRUE) {
$zip->extractTo('/home/username/public_html/foldername/'); /*if you dont want to extract this zip into subfolder, your path should be '/home/username/public_html/'*/
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
Run the zipextractor.php in browser(EX: http://www.yourdomainame.com/zipextractor.php). Now your zip file will extract into your webserver's folder where you want.
Thanks to http://webresource4u.blogspot.com/2009/ ... erver.html
-----------------------
New Line Equity

