Re: PEAR::Config question
| From: | Jean-Marc Fontaine | Date: | Fri, 30 May 2003 14:15:30 +0000 |
| Subject: | Re: PEAR::Config question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-5718@lists.php.net to get a copy of this message | ||
Hi again Bertrand :-)
In fact I think I do not use PEAR::Config the way it is supposed to at all
:-/
If I can read and save my PHP array using your code, how can I write my
modified array back to the PHP file ?
Maybe I am dumb but I think that the process is not self explanatory and the
examples and the documentation is quite useless for new comers like me.
Thanks for your time
Jean-Marc
----- Original Message -----
From: "Bertrand Mansion" <bmansion@mamasam.com>
To: "Jean-Marc FONTAINE" <webmaster@dyingculture.net>;
<pear-general@lists.php.net>
Sent: Friday, May 30, 2003 11:13 AM
Subject: Re: [PEAR] PEAR::Config question
<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
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php