News Feed
Sections




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

PHPro.org:
Application Configuration
November 04, 2008 @ 12:09:17

Kevin Waterson has posted a new tutorial today looking at a key part of any web application - the configuration settings and how they can be stored.

PHP applications come in many shapes and sizes. Some used locally from command line, and more commonly, for web based applications. More often than not, regardless of size or type, some form of configuration variables will be stored for global access. [...] Each options has its pros and cons. Here each of these options is explored to see which method is right for your application.

He looks at four different options:

  • an ini file that can be parsed/modified directly by PHP
  • an XML file slightly more complex, but still simple for PHP to use
  • a PHP file with things like PHP arrays defining settings
  • and a database with one or more configuration tables

Each type comes with some example code and format to give you an idea of how they'd work.

1 comment voice your opinion now!
application configuration ini xml database native


blog comments powered by Disqus

Similar Posts

Maarten Balliauw's Blog: PHPLinq 0.4.0 released on CodePlex!

Nick Halstead's Blog: Bad code, bad data flow, good idea?

Zend Developer Zone: PHP and RIA (Presentation Update)

Paul Jones' Blog: Solar 0.25.0 released

Fabien Potencier: Packing a Symfony full-stack Framework Application in one File - Bootstrapping


Community Events





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


security update package tool interview series composer symfony voicesoftheelephpant version laravel introduction framework opinion release install library language podcast community

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