Returns a string of up to length - 1 bytes read from the file pointed to by fp. Reading ends when length - 1 bytes have been read, on a newline (which is included in the return value), or on EOF (whichever comes first). If no length is specified, the length defaults to 1k, or 1024 bytes.
If an error occurs, returns FALSE.
People used to the 'C' semantics of fgets() should note the difference in how EOF is returned.
A simple example follows:
Megjegyzés: The length parameter became optional in PHP 4.2.0