file_get_contents

(PHP 4 = 4.3.0)

file_get_contents -- Reads entire file into a string

Description

string file_get_contents ( string filename [, int use_include_path])

Identical to file(), except that file_get_contents() returns the file in a string.

注: 這個函數可 安全使用於二進位。

提示: 如果fopen wrappers已啟動,則可藉此函數把檔名當成URL使用。 參考fopen()有更多關於如何指定檔名的細節 和附錄 I支援URL協定的列表。

See also: fgets(), file(), fread(), include(), and readfile().