News Feed
Sections




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

TotalPHP:
Using a global configuration file
December 05, 2008 @ 10:25:59

The TotalPHP site is recommending something that can make your development (and maintenance) life much easier in the long run - using a global configuration file through out your app.

t's one of the basics of PHP and if you read any kind of tutorial or book on the subject it's one of the first things they cover, yet I still see people no using a global 'configuration' or 'include' file. It's one of the easiest things to do and will make your life so much easier! This 'configuration' file will include anything that needs to be run on every page of the website.

They suggest that using this configuration file everywhere (including it over the entire site) can make things easier in the long run. The idea is not without problems, though. It only works until you need something custom for a certain area or page - then you have to hack it to evaluate conditions. For most simple uses, though, its a good way to share information (like database connection details) through out the application.

0 comments voice your opinion now!
global configuration file include


blog comments powered by Disqus

Similar Posts

Tiffany Brown's Blog: Turn text files into pull down menus

Gary Hockin: Less is More

SitePoint PHP Blog: What’s your plan for __autoload()?

Stuart Herbert's Blog: PHP Components: PHP Components: Shipping Unit Tests With Your Component

Demian Turner's Blog: Seagull 0.6.4 Release (fixes Security Isse from 0.6.3)


Community Events

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


voicesoftheelephpant development laravel5 laravel language opinion community unittest conference framework library psr7 wordpress introduction extension interview podcast series release api

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