This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:fgets [2017/05/09 10:01] jeff |
uphp:functions:fgets [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 19: | Line 19: | ||
This function works with different resource types. If no size is specified, it will keep reading from the file, stream or socket until it reaches the end of the line (or the end of the file). For streams and sockets it will return characters until a line feed (LF) or carriage return (CR) is reached (it will wait until an entire line is received). If the optional size is specified and the line is longer than this size, the function will return only the number of characters specified. | This function works with different resource types. If no size is specified, it will keep reading from the file, stream or socket until it reaches the end of the line (or the end of the file). For streams and sockets it will return characters until a line feed (LF) or carriage return (CR) is reached (it will wait until an entire line is received). If the optional size is specified and the line is longer than this size, the function will return only the number of characters specified. | ||
+ | |||
+ | **Note:** The maximum length of a returned string in [[hardware: | ||
====Parameters==== | ====Parameters==== | ||
Line 58: | Line 60: | ||
</ | </ | ||
- | ====See Also==== | + | ====Also |
+ | |||
+ | [[strlen()]] - Return the length of a < | ||
[[fopen()]] - Open a file for reading or writing | [[fopen()]] - Open a file for reading or writing |