php file_get_contents() 函数

说明

file_get_contents() 函数将整个文件读入一个字符串。是将文件的内容读入到一个字符串中的首选访法。如果操作系统支持,还会使用内存映射技术来增强性能。读取失败将返回 FALSE。

格式、参数

1
string file_get_contents(string $filename, bool $use_include_path = false, resource $content, int $offset = -1, int $maxlen)

除 filename 外其它都是非必须参数。