01-31-2010, 03:54 AM
|
#2 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
If you look down in the comments on the docs page, you will find many solutions. One such being this:
PHP Code:
$dir_iterator = new RecursiveDirectoryIterator("/path"); $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST); // could use CHILD_FIRST if you so wish
foreach ($iterator as $file) { echo $file, "\n"; }
Of coarse, that would return both files and folders. Some other options are also available such as running glob in a loop of some sort.
|
|
|
|