Simple Machines Community Forum

General Community => Scripting Help => Topic started by: Bill-Kill on May 04, 2007, 08:47:31 PM

Title: Not an SMF code error, but here it is
Post by: Bill-Kill on May 04, 2007, 08:47:31 PM
I am trying to write a news script, and I can't open the news file to add stuff to the beginning. How would I open a file to add to the beginning, but not overwrite what is already there? An example is, I already have,

"Testing testing"

And I use my script to add in:

"Test1"

If I download the file and look at it, here is what I see:

"Test1ng testing"

It just overwrites the code. I am using the fopen() function using r+.