25 Jan
2005
25 Jan
'05
5:24 p.m.
you want the most recent entry from the log. Unfortunately somehow it alway was a left "\n", though, so you got an empty file.
I've just checked that in PHP "w+" means that every _LINE_ separated by "\n"'s written is rewriting the file. So if you echoing "a\nb" into a file opened with "w+", you'll get only "b" in the file. As logs are like ([:alpha:]+\n)*, there's always a trailing newline character which caused the output logfile to be cleared and nothing was written into it. Tamas