|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Configuration Manipulation With PHP Config
Configuration Manipulation With PHP Config
Tired of writing (and rewriting) code to manage your application's configuration variables? Take a look at the PEAR Config class, a PHP toolkit designed specifically for manipulating configuration files and the data within them. This article demonstrates using the Config class to read and write configuration files in XML, PHP and INI formats, and use built-in methods to easily build Web-based application configuration modules. Discuss this article in this thread. You can read the article here . |
|
#2
|
|||
|
|||
|
I think this is a great tool and an important one to keeping your application clean.
Seems like it's pretty straightforward. I was hoping to use something like this so that I could separate out configuration settings for live and development sites. How much of a performance hit is it? For example, is it overkill to use an XML file to store database connection information -- adding XML parse time to database connection and quering time? Is the recommended config storage to use a PHP array in this case? Noah |
|
#3
|
|||
|
|||
|
Hi-
I'm not sure when this article was written, but it is no longer correct. The info on the PEAR website is more current. |
|
#4
|
||||
|
||||
|
The article was written in September last year, so it's quite old now.
|
|
#5
|
|||
|
|||
|
Configuration Manipulation with PHP Config
In the subject article I tried the example provided by I can't seem to get past the error: Cannot instantiate non-existent class: config. Are there some variables that have to be set in Config or is there some other solution to solving the instantiate problem.
Rick |
|
#6
|
||||
|
||||
|
Quote:
Thread merged into the main article discussion thread. |
![]() |
| Viewing: Dev Shed Forums > Other > Development Articles > Configuration Manipulation With PHP Config |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|