logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: PEAR::Config question: msg#00544

Subject: Re: PEAR::Config question
<webmaster@xxxxxxxxxxxxxxxx> 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


--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>