This is a plugin / module of CakePHP2.x
$ cd /full/path/to
$ ls
www.example.com
$ cd www.example.com
$ ls
lib app
- cd app/Plugin
- git clone git://github.com/monsat/environment.git Environment
- Edit like this on your APP/Config/bootstrap.php
# APP/Config/bootstrap.php
// load plugin
CakePlugin::load('Environment');
// load Environment class
App::import('Lib', 'Environment.Environment');
// setting example
Environment::initialize(array(
'Production' => array('example.info', 'www.example.info'),
'Develop' => array('dev.www.example.info'),
));
if (Environment::is('Production')) {
Configure::write('debug', 0);
}
Return True if your basename(ROOT) is 'example.info' or 'www.example.info'
check your basename(APP) instead of basename(ROOT)
Environment::$constant = 'APP';