what's wrong with this code
<?
// reading current working directory
$a = opendir(getcwd());
while ($b = readdir($a)) {
if ( (is_dir($b)) and ($b != ".") and ($b != "..") ){
$path = getcwd()."/".$b;
echo "<a href=$path/><font color=red>$b</font></a><br>";
// reading sub directory
$a2 = opendir($path);
while ($b2 = readdir($a2)) {
if ( (is_dir($b2)) and ($b2 != ".") and ($b2 != "..") ){
$path2 = $path."/".$b2;
echo "<a href=$path2/><font color=blue>...... $b2</font></a><br>";
}
}
closedir($a2);
}
}
closedir($a);
?>