[UPHPU] logging to a file
Scott Hill
llihttocs at gmail.com
Tue Jan 2 09:42:22 MST 2007
On 12/30/06, Orson Jones <orson.uphpu at bookstore.usu.edu> wrote:
>
> I was wondering about doing some logging to a file in an application I am
> building.
>
> I am wondering if there are hidden problems with doing something like the
> following. (Particularly with simultaneous attempts.)
>
> $fp = fopen("data.txt", "a");
> $fputs($fp, $data);
> fclose($fp);
>
> Are there more reliable ways of doing this, or is it sufficient?
When I need this I use syslog. You have to use openlog (and closelog) but
it even works under Windows. Although, as usual Windows makes you jump
through fiery hoops to read the log.
--
Scott Hill
"May you solve interesting problems" - Author Unknown
"A fanatic is one who can't change his mind and won't change the subject." -
Sir Winston Churchill
More information about the UPHPU
mailing list