You Are Here: Home »   Code Tuesday January 6th 2009

Code Library - php

Folder List - (1301 views)


<?

//get the full path to the directory
$dir getcwd();
    
//open it up =)
$handle opendir($dir);

while (
false !== ($file readdir($handle))) {
       if (
$file != "." && $file != ".." && is_dir($file)) {
        
       
//show results
       
echo "$file\n";
   }
}

//close the directory
closedir($handle);

?>