September 2001
Intermediate to advanced
768 pages
32h 45m
English
int readfile(string filename) Send the contents of a file to stdout
Returns:
Bytes read; FALSE on error
Description:
readfile() outputs the contents of a file directly to standard output. If PHP has been configured to be URL-aware, prefixing the filename with either http:// or ftp:// opens a connection to the specified URL. Note that since the PHP URL wrappers don’t support redirects, you have to append a trailing slash to directories. FTP connections must be made to servers with support for passive mode transfers.
Warning:
Because some of the filesystem functions to read/write from files partially share the same code, one or more of the bugs reported elsewhere may also apply to this function.
3.0.8: Crashes when used with URLs on ...
Read now
Unlock full access