How could I achieve this: A (set of) configuration that "knows" whether this is development or live? I want to maintain my configs without worrying about which file to upload where or overwriting essential things. I tried the code below in my mysite/_config.php, but this does not work. Any ideas? Thanks!
Director::set_dev_servers(array(
'localhost',
'127.0.0.1',
));
if(Director::isDev()){
global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "localhost",
"username" => "root",
"password" => "",
"database" => "qu",
);
Security::setDefaultAdmin('bla@fasel.com', '4711');
} else { /* Live */
global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "mysql9-03",
"username" => "qiolanned",
"password" => "RcC)xnF6n",
"database" => "qiolanned",
);
Debug::send_errors_to("bla@fasel.com");
}