here is my code so far...
$rootDir = $_SERVER[DOCUMENT_ROOT];
$ncicDir = $rootDir . "/newcreationinchrist.com";
//open ncic directory and display it's contents
if($handle = opendir($ncicDir)){
echo "<br><br><b>Site Subdirectories: </b>";
while (false !== ($file = readdir($handle))){
if($file != "." && $file != ".."){
//capture only folders
if(is_dir($file)){
$folderName = $file . "Dir";
$folderName = str_replace(" ","_", $folderName);
$fixURL = str_replace(" ", "%20", $file);
$folderURL = $ncicDir ."/" .$fixURL;
echo "<br><br>$tab<a href=$folderURL><b>" . $folderName . "</b></a>";
}
}
}
closedir($handle);
}else{
echo "<br><br>--- error opening <b>$ncicDir</b> directory ---";
}
also I would like to extend this to loop through and list all subfolders of the subfolders of the ncicDir.
Thanks for any you help you guys might have.