Strange behaviour while adding a line at the BOF

From: Date: Wed, 01 Aug 2001 15:36:28 +0000
Subject: Strange behaviour while adding a line at the BOF
Groups: php.general 
Request: Send a blank email to php-general+get-60676@lists.php.net to get a copy of this message
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, Er Galvão Abbott Webdeveloper erabbott@DONTSPAMterra.com.br --------------------------------- To send me an e-mail just remove the CAPITAL TEXT. ---------------------------------

« previous php.general (#60676) next »