Retrieve ZIP files in PHP

by barkkathulla 2013-08-08 15:53:42


$filename = 'show_contents.zip';

// get the exact path to $filename
$store_path = pathinfo(realpath($file), PATHINFO_DIRNAME);

$zip = new ZipArchive;
$res = $zip->open($filename);
if ($res === TRUE) {
// extract it to the $store_path as mentioned above
$zip->extractTo($store_path);
$zip->close();
echo "File received...";
} else {
echo "Some problem Occurs";
}
730
like
0
dislike
0
mail
flag

You must LOGIN to add comments