Creating a configuration file

Every Web application should begin with a configuration file. Configuration files serve several purposes, the four most important being:

◆ Defining constants
◆ Establishing site-wide settings
◆ Creating user functions
◆ Managing errors

Basically, any piece of information that every page in a site might need to access should be stored in a configuration file. (As a side note, if a function would not likely be used by the majority of site pages, I would put it in a separate file, thereby avoiding the extra overhead of defining it on pages where it won’t be called.)

Post A Comment

Anti-Spam Quiz: