Some of website control panel FTP such as Dreamhost do not have extract facility to decompress the compressed file such as zip or rar file. To extract them, just put the PHP script below in the folder in a PHP file and run the PHP file:
<?php
$zip = new ZipArchive;
if ($zip->open(“mapserver.zip“)){
$path = getcwd() . “/mapserver/”;
$path = str_replace(“\\”,”/”,$path);
echo $path;
echo $zip->extractTo($path);
$zip->close();
echo ‘Done.’;
} else {
echo “Error”;
}
?>
You should change the mapserver.zip into your own file name and mapserver into your own directory where the file should be extracted.
Filed under: Agus Nizami, IT |
Tinggalkan Balasan