file_get_contents說明string file_get_contents ( string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]] )和 file() 一樣,只除了 file_get_contents() 把檔案讀入一個字串。將在參數 offset 所特殊的位置開始讀取長度為 maxlen 的內容。若果失敗,file_get_contents() 將返回 FALSE。 file_get_contents() 函數是用來將檔案的內容讀入到一個字串中的偏好方法。若果動作系統支援還會使用記憶體映射技術來增強效能。
注解
| ||||