Fandom

PHP Wiki

file get contents

51pages on
this wiki
Add New Page
Talk0 Share
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.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.