遍历文件并且匹配文件名的时候出错................
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php $search="'/class/i'"; $dir=opendir("./"); $filearray=array(); while(($file=readdir($dir))!==false) { $filearray[]=$file; } foreach($filearray as $value) { if(preg_match_all([color=#FF0000]$search[/color],$value,$filefinal)) { echo "符合搜索的文件名:".$value."<br/>"; } } ?>