i am trying to extract the contents of a zipped folder into the root of the website i have a directory called zip.zip but everything i try creates a directory called zip, is there a way to extract the contents into the root
<?php
$zip = new ZipArchive;
if ($zip->open("zip.zip")){
$path = getcwd() . "/";
$path = str_replace("\\","/",$path);
echo $path;
echo $zip->extractTo($path);
$zip->close();
echo 'Done.';
} else {
echo "Error";
}
?>
thank you