Last active
January 4, 2016 18:40
-
-
Save ulrischa/d882a146a1e3faafc0dd to your computer and use it in GitHub Desktop.
Php flat directory tree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$iterator = new RecursiveDirectoryIterator ('rootdir'); | |
$wrapper = new RecursiveIteratorIterator ($iterator, RecursiveIteratorIterator::SELF_FIRST); | |
foreach ($wrapper as $elem) { | |
echo $elem->getFilename (); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment