php filename test_archive zip zip new ZipArchive zip_resource zip- ope

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<?php
$filename = 'test_archive.zip';
$zip = new ZipArchive;
$zip_resource = $zip->open($filename);
if($zip_resource){
$zip->extractTo(getcwd());
$zip->close();
echo $filename.' extracted with success';
}
else{
echo "failed";
}
?>