Forum Moderators: coopster

Message Too Old, No Replies

fgets reading

new line and bytes to read

         

kumarsena

6:20 pm on Jan 14, 2004 (gmt 0)

10+ Year Member



using fgets to read from a file, if i specify the number of bytes to read, will it stop reaching NL altough number of specified bytes has not been reached?

thanks
kumar

coopster

6:25 pm on Jan 14, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



fgets [php.net]

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.