How to: Support multiple production environments in CodeIgniter
To get this working is very easy. Constants can be seen all the way through CodeIgniter and can be set almost anywhere. To keep things neat and logical we will put this code into application/config/constants.php.
For a simple 2 environment switch you can use the following:
define(