Guest User

Untitled

a guest
Jan 23rd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. sandwich.tar.gz
  2. lettuce
  3. mayonaise
  4. cheese
  5. bread (directory)
  6. wholemeal
  7.  
  8. <?php $archive = new PharData('/upload/directory/sandwich.tar.gz');
  9. foreach($archive as $file) {
  10. echo $file . "<br />";
  11. }
  12.  
  13. <?php
  14. $archive = new PharData('/upload/directory/sandwich.tar.gz');
  15. foreach($archive as $file) {
  16. echo $file;
  17. if($file->isDir()) {
  18. echo ':';
  19. $dir = new PharData($file->getPathname());
  20. foreach($dir as $child) {
  21. echo "<br />$child";
  22. }
  23. }
  24. echo "<br />";
  25. }
  26. ?>
  27.  
  28. $archive = new PharData('/upload/directory/sandwich.tar.gz');
  29.  
  30. foreach (new RecursiveIteratorIterator($archive) as $file) {
  31. echo $file . "<br />";
  32. }
Add Comment
Please, Sign In to add comment