我保存编辑日志的txt文件,我的问题是 如何呼应/显示所有可用的日志/ txt文件在日志目录(PHP)显示可用的文本文件
IM已经取得功能读取文件
function readFile($filename) {
$myfile = fopen("$filename", "r") or die("Unable to open file!");
// Output one line until end-of-file
while(!feof($myfile)) {
echo fgets($myfile) . "<br>";
}
fclose($myfile);
}
上面的代码只是功能ReadFile的,我的问题是节目可用的文件,感谢
['glob'](http://php.net/glob)可能会有所帮助。 –
谢谢,我会读那 –