fopen
| From: | Chris Grigor | Date: | Thu, 25 Sep 2003 15:32:09 +0000 |
| Subject: | fopen | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-163926@lists.php.net to get a copy of this message | ||
Hi
I am writing to a file different sources.
The one writes the date and the next starts writing data.
The date writes fine.
$header = "0$gpsdate";
echo $out_file;
$fp = fopen($out_file, "a");
$write = (fwrite($fp, "$header\n"));
fclose($fp);
Now I get to another batch process that inserts data into the same file but it starts on the same
line the first time round, then carrys on to the next line..
So I end with this
2003-09-25 data
data
data
data
anyone help out so I can get it to write like this
2003-09-25
data
data
data
Thanks
Chris