View Single Post
Old 01-31-2010, 03:54 AM   #2 (permalink)
ETbyrne
how quixotic are you?
 
ETbyrne's Avatar
 
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
ETbyrne is on a distinguished road
Default

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_iteratorRecursiveIteratorIterator::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.
__________________
Dingo Web Systems > http://www.dingocode.com
My Website > http://www.evanbot.com
ETbyrne is offline  
Reply With Quote