[eluser]Phil Sturgeon[/eluser]
[quote author="ucantblamem" date="1199088343"]The only thing you will probably need to change from local to live is your config, which is thankfully all kept in the one spot. But, what I do locally is setup everything exactly like the live (database names, usernames, passwords), so that all I have to change between local and live is the base_url.[/quote]
No no no, thats the gayboy way of doing things!
Put this in your config files.
Code:
if($_SERVER['SERVER_NAME'] == 'localhost'):
$config['base_url'] = "http://localhost/nifootball/";
else:
$config['base_url'] = "http://".$_SERVER['SERVER_NAME']."/";
endif;
This works great in the database config too:
Code:
if($_SERVER['SERVER_NAME'] == 'localhost'):
$active_group = 'local';
elseif($_SERVER['SERVER_NAME'] == 'testing.site.com'):
$active_group = 'test';
else:
$active_group = 'default'; // Live
endif;