PHP3 Manual
PrevNext

fgets

fgets -- get line from file pointer

Description

string fgets(int fp, int length);

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, or on EOF (whichever comes first).

If an error occurs, returns false.

The file pointer must be valid, and must point to a file successfully opened by fopen(), popen(), or fsockopen().

See also fopen(), popen(), fgetc(), and fsockopen().


PrevHomeNext
fgetcUpfgetss