PHP function readfile()

Availability in PHP 4.0

Outputs a file

Parameters

Parameter Data type Default value Note
$filename string not The filename being read.
$use_include_path bool null, You can use the optional second parameter and set it to true, if you want to search for the file in the include_path, too.
$context resource null A context stream resource.

Return values

int

the number of bytes read from the file. If an error occurs, false is returned and unless the function was called as

Other resources

Official readfile function documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.