PHP readfile() Function

The readfile() function reads a file and writes it to the output buffer.This function returns the number of bytes read on success, or FALSE and an error on failure. You can hide the error output by adding an '@' in front of the function name.

int readfile ( string $filename [, bool $use_include_path = FALSE [, resource $context ]] )

Reads a file and writes it to the output buffer.

Example -

ParameterDescription
filenameThe filename being read.
use_include_pathYou can use the optional second parameter and set it to TRUE, if you want to search for the file in the include_path, too.
contextA context stream resource.