三个读取文件操作函数:
file(string $filename,[int $flags = 0]);
![](https://i-blog.csdnimg.cn/blog_migrate/cc755dcb84f0b620dfe41310a925eb93.png)
file自定义函数
string file_get_contents(string $filename)
file_get_contents自定义函数
两个函数用法差不多、返回值都为boolean.
file是吧文件读入到一个数组中。
而file_get_contents是以字符串形式获取文件的内容。
file自定义函数
file_get_contents自定义函数
两个函数用法差不多、返回值都为boolean.
file是吧文件读入到一个数组中。
而file_get_contents是以字符串形式获取文件的内容。