September 2001
Intermediate to advanced
768 pages
32h 45m
English
string fread(resource file_handle, int bytes)
Reads from a file.
Returns:
String
Description:
Reads from a file. The bytes argument allows for a set number of bytes to be read, although reading stops if EOF is reached first. The function is binary-safe, allowing it to safely read binary data (such as images or program executables), as well as character data. The data read is returned as a string.
Warning:
Because some of the filesystem functions to read/write from files partially share the same code, one or more of the bugs reported elsewhere may also apply to this function.
3.0.6: Doesn’t work correctly with sockets, Red Hat Linux 6.
3.0.7: Crashes when reading local file on Red Hat Linux 6, kernel 2.2.7.
3.0.9: Delays/hangs on Linux ...
Read now
Unlock full access