admin 发表于 2020-9-27 14:19

php教程:将整个文件读入一个字符串

php教程:将整个文件读入一个字符串
代码如下:
//方法一:
echo file_get_contents('./test.txt');   //将整个文件读入一个字符串
//方法二:
readfile('./test.txt');        //读取输出文件内容
//注意:echo file_get_contents()==readfile()
页: [1]
查看完整版本: php教程:将整个文件读入一个字符串