logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: HELP - Config Package: msg#00488

Subject: Re: HELP - Config Package
<andre.lourenco@xxxxxxx> wrote :

> Hi, 
> I have this config file (type = 'phparray');
> 
> <?php
> $conf['db']['type'] = "mysql";
> $conf['db']['host'] = "localhost";
> $conf['db']['port'] = "3306";
> $conf['db']['user'] = "user";
> $conf['db']['pass'] = "pass";
> $conf['db']['name'] = "configuration";
> $conf['app']['install-language'] = "english";
> $conf['app']['language'] = "portuguese";
> ?>
> 
> And i want to change $conf['app']['install-language'] to "whatever".
> 
> Note: I can read and write the configuration file using the config
> package.
>     And i have all the packages updated.

Look here, I've written some docs (incomplete)...

http://www.appelsiini.net/~tuupola/php/peardoc2/package.configuration.html

Look at getItem() and setContent().

BTW, as this is a php array, you can also change the value directly in the
array:

Include('arrayfile.php');

$conf['app']['install-language'] = "portuguese";

$config = new Config();
$config->parseDatasrc($conf, 'phparray');
$config->writeConfig('arrayfile.php', 'phparray');

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>