FILE Methods

read()

Read content of a local file.

mixed read( string file [, bool array = false ])

Return

Function can return string or array type value.

Parameter
Description
fileName of local file.
arrayRead content into array.

Return string

$FILE->read("data/test.txt")
RETURN: 'test content'

Read into array

$FILE->read("data/test.txt", true)
RETURN: ARRAY [1]