Home » » file_get_contents

file_get_contents

Written By 1 on Sunday, September 30, 2012 | 6:57 PM

string file_get_contents ( string $filename [, bool $use_include_path = false [, resource $context [, int $offset = -1 [, int $maxlen ]]]] )

Reads entire file into a string

This function is similar to file(), except that file_get_contents() returns the file in a string, starting at the specified offset up to maxlen bytes. On failure, file_get_contents() will return FALSE.


<?php
$homepage 
file_get_contents('http://www.example.com/');
echo 
$homepage;
?>

5.1.0 Added the offset and maxlen parameters. 5.0.0 Added context support.


PHP mail attachment - sending an attachment with PHP

0 Comment:

Post a Comment