PHP遍历文件夹及子文件夹下的所有文件
http://hi.baidu.com/kkeycn/item/79fd3d27219d5fd70e37f9b7
function show_list($path){ if(is_dir($path)){ $dp=dir($path); while($file=$dp->read()) if($file!='.'&&$file!='..') show_list($path.'/'.$file); $dp->close(); } echo "$path<br>"; } show_list('test');