Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How to include configuration data
- Rutger Claes
November 19, 2004, 4:19 pm
rate this thread
PHP named config.php file saying:
$conf['db']['username'] = ...
This is the way it is usualy done. But could you do it with XML (afraid of
the performance hit) or with a ini file;
My main concerns are: security, performance and ease of use.
What have you tried and found usefull?
Rutger Claes email@example.com
Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
Send some filthy mail.
- Alvaro G Vicario
November 19, 2004, 4:34 pm
Re: How to include configuration data
If you use an *.ini file you already have a core function to handle it:
Usage: array parse_ini_file ( string filename [, bool process_sections] )
Purpose: Parse a configuration file
Availability: PHP 4
I don't know much about XML.
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions