News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ben Scholzen's Blog:
Writing powerful and easy config files with PHP-arrays
May 11, 2009 @ 12:05:45

Ben Scholzen has written up a post about how regular PHP arrays can be used as a native configuration option for your applications.

I was asked many times how I organize my config files, and my response was always the same, until some time ago when I switched began refactoring the codebase of my blog. [...] Looking at [the advantages of PHP config files], you may ask now why not everbody is using them. Well the problem mostly is that you cannot create extend-sections (when working with Zend_Config for example).

He compares an example of a method that, using a base config file with some "smarts", you can have it automatically pull in certain files and overwrite settings from the array inside. A sample "other config" file is also included, showing the definition of some PHP settings, resources and database information.

0 comments voice your opinion now!
configuration file array zendframework zendconfig smart base config


blog comments powered by Disqus

Similar Posts

Felix Geisendorfer's Blog: New fix for array junkies: Set::merge assembles yummy arrays

Community News: Zend Framework IRC Channel Launched - #zftalk on FreeNode

Matthew Weier O'Phinney's Blog: Autocompletion with Zend Framework and Dojo

Ibuildings Blog: Off-The-Shelf Server Setup

Zend Framework By Examples: Handling dates and times (Zend_Date)


Community Events





Don't see your event here?
Let us know!


api framework code library project bugfix wordpress introduction interview release laravel threedevsandamaybe community list podcast language application developer series configure

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework