note 17319 deleted from function.feof by jimw

From: Date: Thu, 20 Dec 2001 20:09:22 +0000
Subject: note 17319 deleted from function.feof by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23391@lists.php.net to get a copy of this message
If you use feof to walk through a file in a webpage, like this for instance: while(!feof($fd)) { // do things } it's arguably easier to use filesize instead: for ($i=0; $i<filesize($fd); $i++) { //do things } If you use feof and the file is not found, php will generate an endless list of errors. And you'll wonder why your webpage continues loading for so long...

« previous php.notes (#23391) next »