Revision: 27027
Updated Code
at May 20, 2010 09:10 by frankyfish
Updated Code
define('ENVIRONMENT', preg_match('/(dev\.)|(\.local)|(localhost)|(192\.168)/', $_SERVER["HTTP_HOST"]) ? "dev" : "prod");
Revision: 27026
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 20, 2010 09:04 by frankyfish
Initial Code
define('ENVIRONMENT', preg_match('/(\.local\/)|(localhost)|(192\.168)/', $_SERVER["HTTP_HOST"]) ? "dev" : "prod");
Initial URL
Initial Description
Will return "dev" when it detect those syntax in the hostname dev. .local localhost 192.168
Initial Title
Detect Dev or Prod environment
Initial Tags
Initial Language
PHP