Definition and usage
The file() function reads the entire file into an array.
Similar to file_get_contents(), except file() returns the file as an array. Each cell in the array is a corresponding line in the file, including newlines.
If failed, returns false.
Grammar
file(path,include_path,context)
Parameter Description
path is required. Specifies the file to be read.
include_path is optional. If you also want to search for files in include_path, you can set this parameter to "1".
context
Optional. Specifies the environment for a file handle.
context is a set of options that can modify the behavior of the stream. If null is used, it is ignored.