Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. $path_to_zip = '/some-local-path/testfile.zip';
  2.  
  3. $archiver = archiver_get_archiver($path_to_zip);
  4.  
  5. $files = $archiver->listContents();
  6.  
  7. $extract_location = '/some-extract-location/';
  8.  
  9. if (file_exists($extract_location)) {
  10. file_unmanaged_delete_recursive($extract_location);
  11. }
  12.  
  13. $archiver->extract($extract_location);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement