$oldPath = $_SERVER['DOCUMENT_ROOT'] . $_SERVER['REQUEST_URI'];
$path = str_replace("unzip.php","",$oldPath);
echo $path;
$zip = new ZipArchive;
$res = $zip->open('dadinfo.zip');
if ($res === TRUE) {
$zip->extractTo($path);
$zip->close();
echo 'woot!';
} else {
echo 'doh!';
}
?>
$path = str_replace("unzip.php","",$oldPath);
echo $path;
$zip = new ZipArchive;
$res = $zip->open('dadinfo.zip');
if ($res === TRUE) {
$zip->extractTo($path);
$zip->close();
echo 'woot!';
} else {
echo 'doh!';
}
?>