Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sandwich.tar.gz
- lettuce
- mayonaise
- cheese
- bread (directory)
- wholemeal
- <?php $archive = new PharData('/upload/directory/sandwich.tar.gz');
- foreach($archive as $file) {
- echo $file . "<br />";
- }
- <?php
- $archive = new PharData('/upload/directory/sandwich.tar.gz');
- foreach($archive as $file) {
- echo $file;
- if($file->isDir()) {
- echo ':';
- $dir = new PharData($file->getPathname());
- foreach($dir as $child) {
- echo "<br />$child";
- }
- }
- echo "<br />";
- }
- ?>
- $archive = new PharData('/upload/directory/sandwich.tar.gz');
- foreach (new RecursiveIteratorIterator($archive) as $file) {
- echo $file . "<br />";
- }
Add Comment
Please, Sign In to add comment