Name

file

Synopsis

array file(string filename[, int flags [, resource context ]])

Reads the file into an array. flags can be one or more of the following constants:

FILE_USE_INCLUDE_PATH

Search for the file in the include path as set in the php.ini file

FILE_IGNORE_NEW_LINES

Do not add a newline at the end of the array elements

FILE_SKIP_EMPTY_LINES

Skip any empty lines

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.