header.php
define('DEV_ENV', 'staging');
other files
if( !defined('DEV_ENV') ) { die('error message here'); }
switch(DEV_ENV) {
case 'production':
$conn_string = "foo";
break;
case 'staging':
$conn_string = "bar";
break;
case 'development':
$conn_string = "baz";
break;
default:
die('error message here');
}