HTML and CSS Reference
In-Depth Information
In config.inc.php , add the code shown in bold to declare the configuration variables as constants:
<?php
/**
* A sample configuration file
*
* The variables below need to be filled out with environment specific data.
*
* @author Jason Lengstorf <jason@lengstorf.com>
* @author Phil Leggetter <phil@leggetter.co.uk>
*/
// Set up an array for constants
$_C = array();
//-----------------------------------------------------------------------------
// General configuration options
//-----------------------------------------------------------------------------
$_C['APP_TIMEZONE'] = 'US/Pacific';
//-----------------------------------------------------------------------------
// Database credentials
//-----------------------------------------------------------------------------
$_C['DB_HOST'] = 'localhost';
$_C['DB_NAME'] = '';
$_C['DB_USER'] = '';
$_C['DB_PASS'] = '';
//-----------------------------------------------------------------------------
// Enable debug mode (strict error reporting)
//-----------------------------------------------------------------------------
$_C['DEBUG'] = TRUE;
//-----------------------------------------------------------------------------
// Converts the constants array into actual constants
//-----------------------------------------------------------------------------
foreach ($_C as $constant=>$value) {
define($constant, $value);
}
Save this file after adding the correct values for each variable; you can close it in your editor afterward because
you won't need to edit this file again during this chapter.
don't forget to update the DB_HOST , DB_NAME , DB_USER , and DB_PASS values with your development database
credentials. Without them, the app will throw a fatal error when you build the database connection scripts later in this chapter.
Caution
 
 
Search WWH ::




Custom Search