Repeat the loop until fgets returns NULL.
重复该循环直至fgets返回NULL。
Well, you saw an example using a loop with fgets.
好的,您看到了fgets使用循环的示例。
(As we've seen above, fgets returns NULL while getc returns EOF.)
正如我们在上面看到的,fgets返回NULL而getc返回e OF。
The fgets function is your weapon of choice for this first example.
fgets函数是处理第一个示例的首选武器。
The fgets() function is used to read a single line from a file.
函数用来读取文件中的一行内容。
The fgets function is only one of many file-reading functions available.
fgets函数是多个文件读取函数中惟一一个可用的。
Just as in other PHP program, the reading could equally well be done with fgets.
就像在其他PHP程序一样,读取可以很好地通过fgets完成。
The fgets, fgetss, fread, fscanf, and fclose functions also return False on error.
fscanf和fclose 函数在出错时也返回False。
The gets function reads from standard input, whereas fgets reads from the specified stream.
gets函数从标准输入读取,fgets从指定的流读取。
Note: fgets reads at most BUFSIZ - 1 chars from fin and stores them in the char string line.
注:fgets最多从fin读取BUFSIZ-1个字符并将它们存储在字符串行。
The function acts like fgets, but strips away any HTML or PHP tags it finds, leaving only naked text.
该函数的功能类似于fgets 函数,但将去掉发现的任何HTML或PHP标记,只留下纯文本。
If the page type is fixed-lines-per-page, we read input line by line using the fgets library function.
若页类型是每页行数固定的,则使用fgets库函数逐行读取输入。
Then, whenever we call either fgets() or getc(), the data is passed into our program variables (line or c).
然后,每当我们调用fgets()或getc() ,数据被传递到我们的程序变量(line 或 c )中。
While the split command drops the newlines, the newlines are still attached to the strings in the array when using the file command (as with the fgets command).
虽然split命令将删除新行,但是当使用file命令(与fgets命令一样)时,新行仍将被附加到数组中的字符串上。
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的处理目标略有不同:它趋于从二进制文件(即,并非主要包含人类可阅读的文本的文件)中读取信息。
It is needed for the file opening, closing, reading, and writing functions (fopen , fclose , fgets , getc , and so on), for the printf family of functions, and for the setvbuf function.
文件的打开、关闭、读和写函数(fopen 、fclose 、fgets 、getc等等)、printf函数系列和setvbuf函数都需要它。
It is needed for the file opening, closing, reading, and writing functions (fopen , fclose , fgets , getc , and so on), for the printf family of functions, and for the setvbuf function.
文件的打开、关闭、读和写函数(fopen 、fclose 、fgets 、getc等等)、printf函数系列和setvbuf函数都需要它。
应用推荐