I am confused. I had set up the following code in my index.php to auto switch between xampp and server database config files:
define('ENVIRONMENT', isset($_SERVER['SERVER_NAME'])=='my_domain_name.com' ? 'production' : 'development');
echo 'SERVER_NAME '.$_SERVER['SERVER_NAME']; // getting localhost
echo 'env '.ENVIRONMENT; // getting production.
In Xampp locally, I thought this would result in the ENVIRONMENT constant set to 'development' with $_SERVER['SERVER_NAME']=localhost. Would someone mind explaining what I'm doing wrong here?