RE: [PHP-WIN] Writing to a file

From: Date: Thu, 25 Sep 2003 20:11:22 +0000
Subject: RE: [PHP-WIN] Writing to a file
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-21566@lists.php.net to get a copy of this message
I guess this all depends on how you're writing to the file. Without code, I'm not sure what the specific problem is. One way to do this would be to read the file into an array and replace the line in that array. Then, write the newly constructed array to file. This way, at write time, the former data no longer exists. -M -----Original Message----- From: Gerardo Rojas [mailto:grojas@strategicinc.com] Sent: Thursday, September 25, 2003 2:09 PM To: php-windows@lists.php.net Subject: [PHP-WIN] Writing to a file I'm am able to open the file read and write to it. The problem is that I want to replace a line of text with another line. My function is actually writing my new line after the line I wanted to change. Can we do arithmetic on the $fd (file handle or file descriptor)? To tell PHP to write where ( $fd - 1 ) points to? -- Gerardo S. Rojas mailto: grojas@strategicinc.com

« previous php.windows (#21566) next »