n. 从文件中读;从文件读二进制数据
网络 读取文件; 读取打开的文件; 读二进制文件
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 的处理目标略有不同:它趋于从二进制文件(即,并非主要包含人类可阅读的文本的文件)中读取信息。