Re: Config files
| From: | CPT John W. Holmes | Date: | Wed, 13 Aug 2003 14:19:05 +0000 |
| Subject: | Re: Config files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159431@lists.php.net to get a copy of this message | ||
From: "Hardik Doshi" <php_hardik@yahoo.com>
> I have following options for working with the
> configuration files with the relatively large web
> application.
>
> 1. Configuration variables using the DEFINE.
>
> 2. Array - Each configuration variable as an array
> element.
>
> 3. PHP.INI like config files.
A combination of #3 and #2. Store the data in a php.ini-style config file
and use parse_ini_file() to read it into an array.
You could even merge the array into the $_SERVER (or any other superglobal)
array so that your config vars are available in functions without having to
make anything global.
---John Holmes...