View Single Post
  #2 (permalink)  
Old 09-09-2007, 05:50 AM
SBh SBh is offline
Member
 
Join Date: Sep 2007
Posts: 58
Default

Code:
$folder = "forum/"; //change directory name as you wish
$handle = opendir($folder); 

while ($file = readdir($handle)) 
{
 $files[] = $file; 
} 
closedir($handle); 

foreach ($files as $file) { 
    echo $file."<br>"; 
}
With this code you can list all files in a directory. With additional modifications you can let it work in recursive way.
Reply With Quote