Read and store entire file content
The file_get_contents() reads a file into a string.
This function is the preferred way to read the contents of a file into a string. Because it will use memory mapping techniques, if this is supported by the server, to enhance performance.
File_Get_Contents () works the same as file () except it returns a string instead of an array. This function retrieves data from an external file and then puts it into a string for use.
$filestring = file_get_contents($filename);
This is a test file with test text.