
function getdir($path){
$hd=opendir($path);
while(($file = readdir($hd)) !== false){
$dir=$path . '/' . $file;
if($file == '.' || $file == '..'){
continue;
}
if(is_dir($dir)){
echo $file . ':<br>';
getdir($dir);
}else{
echo $path . ': ' . $file . '<br>';
}
}
}
getdir($path);


