file_get_contents

PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
file_get_contents - Reads entire file into a string

Example #1 Reading a section of a file

Result: string(14) "lle Bjori Ro"
PHP Version:

Example #2 Get and output the source of the homepage of a website

PHP Version:

Example #3 Searching within the include_path

PHP Version:

Example #4 Using stream contexts

PHP Version:


Example #5 of file_get_contents

PHP Version: