Advertisement
Guest User

Untitled

a guest
May 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement