function get_dir($dir)
{
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($file = readdir($dh)) !== false)
{
if ($file != "." && $file != "..")
{
if( is_dir("$dir/$file") )
{
get_dir("$dir/$file");//recall
}
$list[$i] = $file;
$i++;
}
}//end while
closedir($dh);
}
}
}//end open_dir()
get_dir("dir_path");
?>
TAG diractory

