I tried to extract a zip file using ziparchive, here's my code:
$path = "/test/admin";
$zip = new ZipArchive;
if ($zip->open("test.zip") === TRUE) {
$zip->extractTo($path."/", array("index.php"));
$zip->close();
}
but the output becomes /test/admin/index.php/. The file becomes a folder.
Can someone help me with this.