Re: PEAR::Config question
| From: | Bertrand Mansion | Date: | Fri, 30 May 2003 09:13:05 +0000 |
| Subject: | Re: PEAR::Config question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-5708@lists.php.net to get a copy of this message | ||
<webmaster@dyingculture.net> wrote :
> Hi Bertrand,
>
> thanks for your help and your explanations.
>
> I changed the way I use config.
> Now I include the php config file in my scripts and I only use PEAR::Config
> in the modification function.
>
> Unfortunatly you showed me how to save the config in another format but you
> did not show me how to write my modified array back to the same file.
>
> In fact I would like to understand how to do this simple thing :
>
> - Load the PHP file containing a $conf array
> - Changing some $conf values
> - Writing the $conf array( with the modified values) in the PHP file <---
> that's the point I am missing I already know how to do the other ones ;-)
$configuration = new Config();
$configuration->parseConfig("conf_{media}.php", 'phparray');
...
$configuration->writeConfig("conf_{media}.php", 'phparray');
I am sure you could have guessed it by yourself ;)
Bertrand Mansion
Mamasam