- $path = '..';
 - function get_filetree($path){
 - $tree = array();
 - foreach(glob($path.'/*') as $single){
 - if(is_dir($single)){
 - $tree = array_merge($tree,get_filetree($single));
 - }
 - else{
 - $tree[] = $single;
 - }
 - }
 - return $tree;
 - }
 - print_r(get_filetree($path));
 
新闻热点
疑难解答