SHARE
TWEET

Untitled

a guest May 19th, 2017 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?PHP
  2. // create object
  3. $zip = new ZipArchive();  
  4.  
  5. // open archive
  6. if ($zip->open('app-0.09.zip') !== TRUE) {
  7.     die ("Could not open archive");
  8. }
  9.  
  10. // get number of files in archive
  11. $numFiles = $zip->numFiles;
  12.  
  13. // iterate over file list
  14. // print details of each file
  15. for ($x=0; $x<$numFiles; $x++) {
  16.     $file = $zip->statIndex($x);
  17.     printf("%s (%d bytes)", $file['name'], $file['size']);
  18.     print "
  19. ";    
  20. }
  21.  
  22. // close archive
  23. $zip->close();
  24. ?>
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top