Hi folks:
I'm going nuts trying to add a line of data in the beginning of a text file.
The text file looks like:
02_01
03_01
04_01
and so on. When I try to add a line so the text file becomes this:
01_01
02_01
03_01
04_01
I get the following result:
_01
03_01
04_01
Here's how I'm attepmting to do it:
$foofile = "/usr/local/.../list.txt";
$open_foo = fopen($foofile, "r+");
fputs($foofile,"$temp\n");
fclose($foofile);
As a matter of fact the application I'm building is a little more complex than this, but since I'm positive that the error is in the "add-a-line" routine...
Please I'm really confused about this. Logically this should work, shouldn't?
HELP!
Thanks in advance.