Author: Bopolissimus Platypus Date: To: PHP Web Development Subject: tail - alike weirdness in php
i ran across something weird when i was writing something that sits on a
file and sort of works like "tail -f".
when you do something like this:
when you get to the end of the loop, feof($fp) is true.
now, if the file is being updated (e.g., it's a log file)
then the file might not actually be at end of file anymore.
however, your $fp filehandle still thinks that it is (at eof).
in C, you would call clearerr(FILE *) to clear the
eof flag. there doesn't seem to be anything similar
in PHP. has anyone come across something like