note 11847 added to function.feof.php
| From: | fuzzy666 at altern dot org | Date: | Fri, 09 Mar 2001 16:33:34 +0000 |
| Subject: | note 11847 added to function.feof.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-12111@lists.php.net to get a copy of this message | ||
I want to write a log file which append the name of the last user to the current file.
Is anyone has a solution ?
My code :
$logfile = fopen("./log.log",'w');
while(!feof($logfile)) {
fseek($logfile,ftell($logfile)+1);
}
$line = $user.chr(13).chr(10);
fputs($logfile,$line);
fclose($logfile);
doesn't work . The function "feof" seems to be inactive.(infinite loopback)
http://www.php.net/manual/fr/function.feof.php