public function extractZip($zipName, $newLocation) {
$zip = new ZipArchive;
if ($zip->open($zipName) === TRUE) {
if (substr($newLocation, -1) != '/')
$newLocation .= '/';
if (!file_exists($newLocation))
mkdir($newLocation);
return $zip->extractTo($newLocation);
$zip->close();
}
return false;
}
Comments