O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

readfile

Synopsis

int readfile(string path[, bool include[, resource context]])

Reads the file at path, in the streams context context if provided, 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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required