PHP Classes

File: config.php

Recommend this page to a friend!
  Classes of solomongaby   MySQL Versioning   config.php   Download  
File: config.php
Role: Configuration script
Content type: text/plain
Description: applications config file
Class: MySQL Versioning
Update MySQL databases using SQL change set files
Author: By
Last change:
Date: 15 years ago
Size: 825 bytes
 

Contents

Class file image Download
<?php
    $configType
= (isset($_SERVER['SERVER_NAME']) & in_array($_SERVER['SERVER_NAME'], array('127.0.0.1', 'localhost'))) ? 'development' : 'production';
   
define('PROJECT_STAGE', $configType);

    switch (
PROJECT_STAGE) {
        case
'production':
           
error_reporting(0);

           
define('DB_HOST', 'localhost');
           
define('DB_USER', 'user_sql');
           
define('DB_PASSWORD', '***********');
           
define('DB_NAME', 'dn_name_public');
           
            break;

        case
'development':
        default:
           
error_reporting(E_ALL ^ E_NOTICE);

           
define('DB_HOST', 'localhost');
           
define('DB_USER', 'user_local');
           
define('DB_PASSWORD', '********');
           
define('DB_NAME', 'db_local');

        break;
    }

/*****
After this you can add your own configurations, but the above constants are required unless you change the class
*/