Well, fopen() use to be a common choice here.
On Mon, 2003-10-13 at 19:58, Harpreet wrote:
> I am parsing an xml file and show the data in text boxes in a form .
> I want to edit the data and then update the file.
>
> How can i go about editing a file using php
>
> Help is appreciated
>
> Regar
>this doesn't work. It will still write the new line after the line (I matched).
>Everytime I read a line from a file, the $fd gets incremented, so when I say fwrite,
>$fd is already pointing to the next line in the file? Any suggestions as to working
>around this? I can't rewrite the entir
jas
Subject: RE: [PHP-WIN] Writing to a file
You should use regex (regular expressions) to do this, because is simpler.
You can get the contents of the files into a variable:
Hope it helps!
Byes!
MG29
-Mensaje original-
De: Gerardo Rojas [mailto:[EMAIL PROTECTED]
Enviado el: Jueves, 25 d
Val[0] );
break;
}
--
-Original Message-
From: Mike Brum [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 3:11 PM
To: Gerardo Rojas; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Writing to a file
I guess this all depends on how you're writing to the file. Without
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 d