This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:fread [2017/04/10 13:00] jeff |
uphp:functions:fread [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
====Description==== | ====Description==== | ||
- | <well size=" | + | <well size=" |
- | < | + | |
<span style=" | <span style=" | ||
- | <span style=" | + | <span style=" |
- | </ | + | |
- | [[fread]] ( | + | |
- | < | + | |
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
Line 19: | Line 15: | ||
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
- | </ | + | </ |
- | </ | + | |
This function attempts to read a specified number of bytes from a file, stream or socket. If less than the number of bytes are available it will return the available data. If no data is available it will return an empty string. | This function attempts to read a specified number of bytes from a file, stream or socket. If less than the number of bytes are available it will return the available data. If no data is available it will return an empty string. | ||
Line 33: | Line 28: | ||
* < | * < | ||
- | * The length of the returned | + | * < |
* < | * < | ||
====Example==== | ====Example==== | ||
- | **Read the 32 byte MD5 hash from file /md5.txt:** | + | ===Read the 32 byte MD5 hash from file /md5.txt=== |
<code php> | <code php> |