Welcome Guest, Not a member yet? Register   Sign In
establishing a local configuration for each developer, dev server, production...
#9

Why use a hook? You can define the environment inside the index.php

Why use a hook? you can simply define the environment in the index.php


PHP Code:
if(! defined('ENVIRONMENT') )
{
 
 $domain strtolower($_SERVER['HTTP_HOST']);
 
 switch($domain) {
 
   case 'www.yoursite.tld' :
 
     define('ENVIRONMENT''production');
 
   break;
 
   case 'test.yoursite.tld' :
 
     define('ENVIRONMENT''testing');
 
   break;
 
   default :
 
     define('ENVIRONMENT''development');
 
   break;
 
 }

You can find more info on environment from a post of mine: http://avenir.ro/codeigniter-tutorials/s...ironments/
Reply


Messages In This Thread
RE: establishing a local configuration for each developer, dev server, production... - by Avenirer - 01-12-2015, 05:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB