How to extract ZIP file using PHP


#1

If you migrate from other hosting to best hosting this will be useful

<?php
$zip = new ZipArchive;
if ($zip->open('test.zip') === TRUE) {
    $zip->extractTo('/my/destination/dir/');
    $zip->close();
    echo 'ok';
} else {
    echo 'failed';
}
?>

#2

This is more better i believe :wink:


#3