PHP: Defining configuration values






Every web application requires configuration files which contain values that are used throughout the application. In this post we will look at some of the methods developers use to define configuration settings and also what should be avoided.

The ugly way

I have seen many many developers do this and am myself guilty of doing it during my initial coding days. Consider the following code.

//development define("HOST", "localhost"); define("DATABASE_USER", "root")...
 •  0 comments  •  flag
Share on Twitter
Published on January 07, 2011 07:09
No comments have been added yet.