The readfile() function reads a file and writes it to the output buffer.
Tip: You can use a URL as a filename with this function if the fopen wrappers have been enabled in the php.ini file.
readfile(
file,
include_path,
context)
Parameter | Description |
---|---|
file | Required. Specifies the file to read |
include_path | Optional. Set this parameter to TRUE if you want to search for the file in the include_path (in php.ini) as well |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
Return Value: | The number of bytes read on success, FALSE and an error on failure. You can hide the error message by adding an '@' in front of the function name |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.0: Added context support |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!