Config.php
From Sum-e Wiki
It is just an example, do not take it strict
<?php
/**
* @package sample_project
* @subpackage framework
*/
define( 'PRODUCTION', false );
define( 'PROJECT_PATH', substr( __file__, 0, strlen( __file__ ) - 18 ) );
define( 'PROJECT_NAME', 'sample_project' );
define( 'SMARTY_COMPILE_DIR', "/tmp/sample_project/" );
define( '/var/www/anadvert/smarty/' );
define( 'SMARTY_TEMPLATES_DIR', PROJECT_PATH ."/templates/" );
if( PRODUCTION )
{
define( 'DB_NAME', 'database_name' );
define( 'DB_USERNAME', 'database_username' );
define( 'DB_PASSWORD', 'database_password' );
define( 'ADMIN_EMAIL', 'you@ayourserver.com' );
define( 'TIMER', microtime( true ) );
define( 'SMARTY_COMPILE_DIR', '/tmp/sample_project' );
define( 'IMAGE_DIR', PROJECT_PATH .'/images/' );
require_once( PROJECT_PATH .'/smarty/Smarty.class.php' );
}
else
{
define( 'DB_NAME', 'database_name' );
define( 'DB_USERNAME', 'database_username' );
define( 'DB_PASSWORD', 'database_password' );
define( 'ADMIN_EMAIL', 'you@ayourstagingserver.com' );
define( 'TIMER', microtime( true ) );
define( 'SMARTY_COMPILE_DIR', '/tmp/sample_project' );
define( 'IMAGE_DIR', '/home/you/assets/sample_project/images/' );
require_once( PROJECT_PATH .'/smarty/Smarty.class.php' );
}

