SHARE
TWEET

Untitled

a guest Apr 21st, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (! defined('ENV')) {
  2.     $production  = 'example.com';
  3.     $staging     = 'test.example.com';
  4.     $local       = 'example.dev';
  5.  
  6.     switch (strtolower($_SERVER['HTTP_HOST'])) {
  7.         case $production:
  8.             define('ENV', 'production');
  9.             define('ENV_FULL', 'Production');
  10.             define('ENV_DEBUG', false);
  11.             define('ENV_DOMAIN', $production);
  12.         break;
  13.  
  14.         case $staging:
  15.              ...
  16.         break;
  17.  
  18.         case $local:
  19.              ...
  20.         break;
  21.     }
  22. }
  23.    
  24. Use of undefined constant ENV - assumed 'ENV'
  25. Fatal error: require(): Failed opening required '/var/www/html/config/environments/config.ENV.php'
RAW Paste Data
Top