<?
function IsDebugMode()
{
return TRUE;
}
function Debug($strDebug)
{
if(IsDebugMode())
{
echo "<br>---debug".$strDebug."---<br>";
}
}
function EnumDeep($path, $nDeep)
{
$dfArray = scandir($path);
$j=$nDeep;
echo "<br>";
while($j-->=0)
{
echo " ";
}
echo $path;
for($i=0; $i<count($dfArray); $i++)
{
if($dfArray[$i]=='.' || $dfArray[$i]=='..')
{
continue;
}
$childPath=$path."\\".$dfArray[$i];
if(is_dir($childPath) && file_exists($childPath))
{
EnumDeep($childPath, $nDeep+1);
}
else
{
$j=$nDeep;
echo "<br>";
while($j-->=-1)
{
echo " ";
}
echo $dfArray[$i];
}
}
}
$nDeep=0;
$path="j:\\";
EnumDeep($path, $nDeep);
?>