Posted By

electblake on 04/21/10


Tagged

settings drupal Development


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

titosemi
halfshadows
zack


Drupal - Settings.php that adapts to live & dev servers


 / Published in: PHP
 

  1. if (stripos($_SERVER['SERVER_ADDR'],'192.168.1.5') === 0 ) {
  2. $db_url = 'mysqli://user:pass@localhost/dbname_dev';
  3. } else {
  4. $db_url = 'mysqli://user:pass@localhost/dbname_live';
  5. }

Report this snippet  

You need to login to post a comment.