Below is a special narrated feof tutorial, there are implementations and so on.
Below is a special narrated feof tutorial, there are implementations and so on.
Feof
(PHP 4, PHP 5)
feof-file pointer to end of test file
Describe
Boolean feof (resource $ processing)
The file pointer at the end of the test.
Parameters
Handle
The file pointer must be valid and must point to a file that successfully opened fopen () or Fsockopen () (and has not yet closed fclose ()).
return value
Returns true if the file pointer is EOF parsed or an error occurred (including a socket timeout), otherwise false is returned.
Note
Warning
If a connection is opened Fsockopen () does not shut down the server, feof () will wait until the timeout has reached the return value of true. The default timeout value is 60 seconds. You can use Stream_set_timeout () to change this value.
Warning
If the pass file pointer is not valid, you will get an infinite loop because feof () does not return a value of true.
See Example:
If file can not be read or doesn ' t exist fopen function returns FALSE
$file = @fopen ("No_such_file", "R");
FALSE from fopen'll issue warning and result in infinite loop here
while (!feof ($file)) {
}
Fclose ($file);
?>
http://www.bkjia.com/PHPjc/445485.html www.bkjia.com true http://www.bkjia.com/PHPjc/445485.html techarticle Below is a special narrated feof tutorial, there are implementations and so on. Below is a special narrated feof tutorial, there are implementations and so on. Feof (PHP 4, PHP 5) feof-test file End file refers to ...