
function getTree($dir){
$arr=scandir($dir); // 扫描文件夹
foreach ($arr as $v) {
$itme=$dir.'/'.$v;
if(is_dir($itme)){
if($v == '.' || $v=='..'){
continue;
}
echo "<font color='red'>".$itme."</font>",'<br>';
getTree($itme);
}else{
echo "<font color='blue'>".$itme."</font>",'<br>';
}
}
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号