今天无聊中练习了一下PHP遍历文件目录的程序,编写了以下两个程序,不过质量不是很好,轻拍~~~1、清除PHP缓存文件复制代码 代码如下:<?php function read_dir($dir,$file) { $a =strpos($file,”.php”); if($a>0) { unlink($dir . $file); echo “delete $dir$file <br>”; return true; } if(strpos($file,”.”) === 0 || strpo