FANDOM


The title of this article should be file_get_contents, but due to technical restrictions, cannot contain an underscore.

Returns content of a file as a string.

Arguments Edit

void file get contents ({{{params}}})

Argument Inclusion Edit

  • Context support added in PHP5
  • Offset and Maxlen parameters added in version 5.1.0

Examples Edit

Example 1: (example description) Edit

<?php
$file = file_get_contents("http://example.com/index.html");
echo $file;
?>

Output Edit

(will output the exact html of example.com/index.html, as seen by the server)
For more details on this function, visit its entry in the php manual.