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
>
that could work but i dont want to append the new line a the bottom which it looks
like thats what your doing.
i need to replace the line where it is
<-CoreComm-Internet-Services---http://core.com->
(Jon Marshall CoreComm Services Chicago)
([EMAIL PROTECTED] Syst
maybe this?
while($line = fgets($fp, 1024)) {
$line = str_replace("replace_this", "with_this", $line);
$content .= $line;
}
fwrite($fp, $content);
--
Henrik Hansen
- Original Message -
From: "enthalpy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 14, 2001 1
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
4 matches
Mail list logo