RE: [PHP] replacing a line in a file

2001-03-14 Thread Tim Ward
owing disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: enthalpy [mailto:[EMAIL PROTECTED]] > Sent: 13 March 2001 23:56 > To: Henrik Hansen > Cc: php general > Subject: Re: [PHP] replacing a line in a file >

Re: [PHP] replacing a line in a file

2001-03-13 Thread enthalpy
m: "enthalpy" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, March 14, 2001 12:29 AM > Subject: [PHP] replacing a line in a file > > > > > > having problems replacing a line in a file. > > > > need to search t

Re: [PHP] replacing a line in a file

2001-03-13 Thread Henrik Hansen
ECTED]> Sent: Wednesday, March 14, 2001 12:29 AM Subject: [PHP] replacing a line in a file > > having problems replacing a line in a file. > > need to search the whole document for a string and then replace that line with a string. > > any ideas? > > this is causing lot

Re: [PHP] replacing a line in a file

2001-03-13 Thread Aviv Revach
Hey! I didn't try to analyze your code, but why not using the file() function which opens a file and puts it's content into an array. After doing that, you could seek that array line-by-line for "$data[0]:$shadow[1]" and replace it with $data[0]:$data[1]. Since you're dealing with full lines i

[PHP] replacing a line in a file

2001-03-13 Thread enthalpy
having problems replacing a line in a file. need to search the whole document for a string and then replace that line with a string. any ideas? this is causing lots of problems now. $fpoint3 = fopen ($testshadow, "r+") or die("couldnt open shadow file again"); $contents = fread ($fpoint3, $s