Re: note 11847 added to function.feof.php
| From: | Jesus M. Castagnetto | Date: | Fri, 09 Mar 2001 19:02:41 +0000 |
| Subject: | Re: note 11847 added to function.feof.php | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-12124@lists.php.net to get a copy of this message | ||
Wouldn't it be simpler to open the file using 'a' (or
'a+') instead of 'w'?
Your note will be removed.
--- fuzzy666@altern.org wrote:
> 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
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/