Hi,
I have a minor problem
I write to an empty txt file some data, but when I try to write again to that same file, the previously inputted data disappears and gets replaced with the new data. I was wondering why that is and if there is an "append" function that i can use other than fwrite(). Maybe im just doing something wrong and dont realize it.
thanks in advance.
fwrite() question
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: fwrite() question
When you issue the fopen() method, look at the mode argument
http://us.php.net/manual/en/function.fopen.php
fopen('myfile','a'); // Appends the file
fopen('myfile','w'); // Overwrites the file
http://us.php.net/manual/en/function.fopen.php
fopen('myfile','a'); // Appends the file
fopen('myfile','w'); // Overwrites the file
Re: fwrite() question
hey thanks, worked great, i knew it was simple