Welcome Guest, Not a member yet? Register   Sign In
switching between development production server
#5

[eluser]Unknown[/eluser]
Would doing the following be a concise and satisfactory solution, or am I missing the inherent system suicide that such an approach would create.

$config['base_url']= "http://".$_SERVER['SERVER_NAME'];


Would something along the lines of this be better...

switch ( $_SERVER['SERVER_NAME'] ) {
case 'staging.server.name':
$config['base_url']= "http://www.staging-server.com";
break;
case 'testing.server.name':
$config['base_url']= "http://www.testing-server.com";
break;
case 'localhost':
$config['base_url']= "http://localhost/";
break;
default:
$config['base_url']= "http://www.staging-server.com";
break;
}


Messages In This Thread
switching between development production server - by El Forum - 07-03-2008, 10:34 PM
switching between development production server - by El Forum - 07-03-2008, 11:09 PM
switching between development production server - by El Forum - 07-04-2008, 11:08 AM
switching between development production server - by El Forum - 07-04-2008, 12:34 PM
switching between development production server - by El Forum - 03-19-2010, 09:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB