Sorry, really stupid question...
Phil Powell
soazine at erols.com
Sat Dec 28 14:24:09 EST 2002
Honestly, what does this do:
$fileID = fopen("nicknames.txt", "a") or die("Could not open " . $path . "/nicknames.txt");
chmod("nicknames.txt", 0755);
fputs($fileID, $nickname . "\
"); fflush($fileID); fclose($fileID);
What does it EXACTLY do? What I'm trying to do is very very simple: I have the nickname of "phil" and I add it to nicknames.txt as "phil" + "\
". The next person adds his name as "bob" + "\
". However, this happens:
phil
philbob
Is it due to the way I'm adding to the file? Can someone show me how to append to a file properly without carrying over persistent existing data like what you see above, instead having it like this:
phil
bob
Thanx, I'm lost here.
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20021228/71a90288/attachment.html>
More information about the talk
mailing list