On windows XP this works fine. Maybe you are using Mac, or Linux, i know that there could be different way to go to new line on those OS's.
As for something else too you could check
A list of possible modes for
fopen(), that is that 'a' you are using in fopen. And you could maybe use other more convenient way.
In your function instead of first setting \n$content, i would set $content\n beacouse 'a' mode
Quote:
|
Originally Posted by php.net
Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.
|
So if it's first time your writing to file it will create empty line on the begining of the file, and new lines at the end of the $content, so you will have empty line at the begining of the file...