<?php
//打开指定目录
function readDirectory($path) {
$handle = opendir ( $path );
while ( ($item = readdir ( $handle )) !== false ) {
//.和..这两个特殊目录
if ($item != "." && $item != "..") {
if (is_file ( $path . "/" . $item )) {
$arr ['file'] [] = $item;
}
if (is_dir ( $path . "/" . $item )) {
$arr ['dir'] [] = $item;
}
}
}
closedir ( $handle );
return $arr;
}
?>
zend编辑器在file下添加一个文件夹就可以查询出一个文件夹数组了: [dir] => Array ( [0] => iam folder )
1、
2、