Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. $dev_names = array('localhost','.dev');
  2.  
  3. if ($_SERVER['SERVER_NAME'] == 'localhost')
  4. {
  5. define('ENVIRONMENT', 'development');
  6. }
  7. else
  8. {
  9. define('ENVIRONMENT', 'production');
  10. }
  11.  
  12. $_SERVER['SERVER_ADMIN'];
  13.  
  14. // environment development check
  15. function __env_dev($check) {
  16. return substr($_SERVER['SERVER_ADMIN'], -(strlen($check))) === $check;
  17. }
  18. // false = production
  19. // true = development
  20. __env_dev("@dev.elop.loc");
  21.  
  22. <?php // global config file which is checked into VCS
  23. $SETTING = "FOO";
  24. @include "config/local_settings.php"; // overrides go here
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement