/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function unzip_file($file, $destination){ // create object $zip = new ZipArchive() ; // open archive if ($zip->open($file) !== TRUE) { } // extract contents to destination directory $zip->extractTo($destination); // close archive $zip->close(); echo 'Archive extracted to directory'; }