运维网's Archiver
论坛
›
php
› php 获取当前目录子文件夹
上都海奶茶馆
发表于 2017-4-11 12:14:15
php 获取当前目录子文件夹
$handle = opendir('/tmp');
$arr = array();
while($file = readdir($handle)){
$newpath="/tmp/".$file;
if(is_dir($newpath)) $arr[] = $newpath ;
}
print_r($arr);
页:
[1]
查看完整版本:
php 获取当前目录子文件夹