Function to test for end of file pointer
boolean
stream_eof
()
Function to open file or url
boolean
stream_open
(string $path, string $mode, integer $options, string &$opened_path)
-
string
$path: The URL that was passed
-
string
$mode: Mode used to open the file @see fopen
-
integer
$options: Flags used by the API, may be STREAM_USE_PATH and STREAM_REPORT_ERRORS
-
string
&$opened_path: Full path of the resource. Used with STREAN_USE_PATH option
Read stream
mixed
stream_read
(integer $count)
-
integer
$count: How many bytes of data from the current position should be returned.
The read write position updates in response to $offset and $whence
boolean
stream_seek
(integer $offset, integer $whence)
-
integer
$offset: The offset in bytes
-
integer
$whence: Position the offset is added to Options are SEEK_SET, SEEK_CUR, and SEEK_END
Function to get the current position of the stream
integer
stream_tell
()
Write stream
integer
stream_write
(string $data)
-
string
$data: The data to write to the stream.