Writing the Configuration Scripts

This Web site will make use of two configuration-type scripts. One, config.inc.php, will manage errors and could be used for other purposes, such as defining functions and establishing constants. The other, mysql_connect.php, will store all of the database-related information.

Making a configuration file

The sole purpose of the configuration file will be to establish the error-management policy for the site. The technique involved—creating your own error handling function—was covered in Chapter 6, “Error Handling and Debugging.” In this chapter I’ll modify the original version in a couple of ways.

During the development stages, I’ll want every error reported in the most detailed way (Figure 13.3). Along with ...

Get PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.