PHP: php_stream_gets - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

php_stream_close php_stream_getc

Last updated: Fri, 26 Jan 2007

view this page in

# php_stream_gets

php_stream_gets -- Read a line of data from a stream into a buffer

## Description

char * php_stream_gets ( php_stream * stream, char * buf, size_t maxlen )

php_stream_gets() reads up to `count`-1 bytes of data from `stream` and copies them into the buffer `buf`. Reading stops after an `EOF` or a newline. If a newline is read, it is stored in `buf` as part of the returned data. A NUL terminating character is stored as the last character in the buffer.

php_stream_read() returns `buf` when successful or NULL otherwise.

The internal position of the stream is advanced by the number of bytes that were read, so that subsequent reads will continue reading from that point.

This function may block in the same way as php_stream_read().

add a note User Contributed Notes
php_stream_gets
There are no user contributed notes for this page.
php_stream_close php_stream_getc

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST