Posted By

sb_01 on 12/08/10


Tagged

php file archive zip unzip


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

bobbym245


Unzip with PHP


 / Published in: PHP
 

  1. $zip = new ZipArchive;
  2. $res = $zip->open(’my_zip_file.zip’);
  3. if ($res === TRUE) {
  4. $zip->extractTo(’my_extract_to_dir/);
  5. $zip->close();
  6. echo ‘ok’;
  7. } else {
  8. echo ‘failed’;
  9. }

Report this snippet  

You need to login to post a comment.