使用php访问文本文件?

get*_*way 1 html php file-io text

我想知道如何使用PHP访问文本文件并使用PHP数组显示信息,这可能看起来像一个新手问题,但我没有使用外部文件.

所以这里.

了home.txt:

ha15rs,250,home2.gif,2
ha36gs,150,home3.gif,1
ha27se,300,home4.gif,4
ha4678,200,home5.gif,5
Run Code Online (Sandbox Code Playgroud)

我想要做的是在html表中对这些信息进行排序,每行代表一行,4行代表数据!谢谢欢呼:))

too*_*asr 8

看起来像逗号分隔的值.请参阅http://ee.php.net/manual/en/function.fgetcsv.php上的示例