Name

readfile

Synopsis

int readfile(string path[, bool include])

Reads the file at path and outputs the contents. If include is specified and is true, the include path is searched for the file. If path begins with http://, an HTTP connection is opened and the file is read from it. If path begins with ftp://, an FTP connection is opened and the file is read from it; the remote server must support passive FTP.

This function returns the number of bytes output.

Get Programming PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.