Posted By

bpdp on 10/07/10


Tagged

php config


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

jplr


Am I Local


 / Published in: PHP
 

  1. /**
  2.  * check to see if we are local or live
  3.  */
  4. if (stristr($_SERVER['HTTP_HOST'], 'localhost') || stristr($_SERVER['HTTP_HOST'], 'work') || stristr($_SERVER['HTTP_HOST'], 'machost')) { define('LOCAL', true); } else { define('LOCAL', false); }

Report this snippet  

You need to login to post a comment.