$handle = opendir('/tmp');
$arr = array();
while($file = readdir($handle)){
$newpath="/tmp/".$file;
if(is_dir($newpath)) $arr[] = $newpath ;
}
print_r($arr);
php 获取当前目录子文件夹
最新推荐文章于 2024-03-26 09:46:21 发布
$handle = opendir('/tmp');
$arr = array();
while($file = readdir($handle)){
$newpath="/tmp/".$file;
if(is_dir($newpath)) $arr[] = $newpath ;
}
print_r($arr);