Re: writing to a file
| From: | David Robley | Date: | Fri, 08 Mar 2002 00:51:16 +0000 |
| Subject: | Re: writing to a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87718@lists.php.net to get a copy of this message | ||
In article <20020306152705.76171.qmail@pb1.pair.com>, vallee.marc-
andre@teccart.qc.ca says...
> Hi,
>
> Here is a foo.txt file :
>
> name=foo
> age=100
> sex=y
>
> I want to open the file, find the age line, and then replace the 100 with
> another value.
> The only way i see, is to rewrite the entire file........
That is correct. You need to load the file into your script, make
whatever changes and then write it back.
>
> Maybe this is a stupid question, but, i tried the online doc, and saw
> nothing about this....
>
--
David Robley
Temporary Kiwi!
Quod subigo farinam