This part of the program is also conventional PHP - in this case, with fread.
程序的这一部分也符合常规php——在本例中,使用fread。
The fgets, fgetss, fread, fscanf, and fclose functions also return False on error.
fscanf 和 fclose 函数在出错时也返回 False。
Note that no matter what number you specify, fread will not read more than 8,192 bytes (8 KB).
不管指定多少字节,fread都不会读取超过8,192个字节(8 KB)。
It's not unusual to run across networking programs that fread in a while in such a way that CPU usage zooms to 100 percent.
经常会遇到这样一些连网程序,以CPU使用率急速上升至100%的方式在while中使用fread。
The fread function serves a slightly different purpose from fgets: It is intended to read from binary files (that is, files that don't consist primarily of human-readable text).
fread 函数与 fgets 的处理目标略有不同:它趋于从二进制文件(即,并非主要包含人类可阅读的文本的文件)中读取信息。
The function loads the file data using a single call to fread , copying the data into a separate structure, before using a strcpy to move the data from the loaded string to the global string.
此函数通过调用fread装载文件数据,把数据复制到另一个结构中,然后使用strcpy把数据从装载的字符串转移到全局字符串中。