// unzip from current to check/ and show list of file
$filename = 'zipfile.zip';
$zip = new ZipArchive;
$res = $zip->open($filename);
if ($res === TRUE) {
$path = 'check/';
$zip->extractTo($path);
$zip->close();
echo 'Unzip!';
} else {
echo 'failed!';
}
echo"<br>";
$zip = new ZipArchive;
$res = $zip->open('zipfile1.zip');
if ($res === TRUE) {
$zip->extractTo('check/');
$zip->close();
echo 'OK';
} else {
echo 'ER';
}
$directory = 'check/';
$scanned_directory = array_diff(scandir($directory), array('..', '.'));
foreach ($scanned_directory as $fn) {
echo $fn."<br>";
}