Returns an error (including the socket timeout) if the file pointer goes to EOF, or TRUE If an error occurs, otherwise returns FALSE.
Definition and usage
The feof () function detects if the end of file (EOF) has been reached.
Returns an error (including the socket timeout) if the file pointer goes to EOF, or True if an error occurs, otherwise returns false.
Grammar
feof (file) parameter description
File required. Specifies the open file to check.
Description
The file parameter is a document pointer. The file pointer must be valid and must point to a file that was successfully opened by fopen () or Fsockopen () (but not yet fclose () closed).
$fh = fopen ("/home/www.bkjia.com/data/users.txt", "RT");
while (!feof ($FH)) echo fgets ($FH);
Fclose ($FH);
?>
http://www.bkjia.com/PHPjc/445445.html www.bkjia.com true http://www.bkjia.com/PHPjc/445445.html techarticle Returns an error (including the socket timeout) if the file pointer goes to EOF, or TRUE If an error occurs, otherwise returns FALSE. Definition and Usage feof () function detection is ...