PHP function stream_get_contents()

Availability in PHP 5.0

Reads remainder of a stream into a string

Parameters

Parameter Data type Default value Note
$handle resource not A stream resource (e.g. returned from fopen)
$maxlength int null, The maximum bytes to read. Defaults to -1 (read all the remaining buffer).
$offset int null Seek to the specified offset before reading.

Return values

string

|bool a string or false on failure.

Other resources

Official documentation for stream-get-contents

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.