时间:2021-07-01 10:21:17 帮助过:20人阅读
function Traverse_files($dir1,$dir2){ $dir = $dir1.'/'.$dir2; //print $dir; //exit; $ss = array(); if (is_dir($dir)){ if ($dh = opendir($dir)){ while (($file = readdir($dh)) !== false){ if($file!=="."&& $file!==".."){ $ss[]=$file; } } print_r($ss); return $ss; closedir($dh); } } } $dirbase = 'd:'; $dirito = '5-24'; $bb = Traverse_files($dirbase,$dirito); printf($bb);