Skip to content

Instantly share code, notes, and snippets.

@chrisl8888
Last active September 27, 2015 07:47

Revisions

  1. chrisl8888 revised this gist Mar 12, 2013. 1 changed file with 8 additions and 9 deletions.
    17 changes: 8 additions & 9 deletions settings-router.php
    Original file line number Diff line number Diff line change
    @@ -2,13 +2,12 @@
    * At the end of the settings.php file for drupal add these lines
    */

    /**
    * settings file routing
    */
    // Localhost
    if (file_exists(dirname(__FILE__) . '/local.settings.php')) {
    /*
    * Settings file routing
    */
    if (file_exists(dirname(__FILE__) . '/local.settings.php')) {
    include dirname(__FILE__) . '/local.settings.php';
    }
    if (file_exists(dirname(__FILE__) . '/stage.settings.php')) {
    include dirname(__FILE__) . '/stage.settings.php';
    }
    }
    if (file_exists(dirname(__FILE__) . '/stage.settings.php')) {
    include dirname(__FILE__) . '/stage.settings.php';
    }
  2. chrisl8888 revised this gist May 1, 2012. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions settings-router.php
    Original file line number Diff line number Diff line change
    @@ -6,13 +6,9 @@
    * settings file routing
    */
    // Localhost
    if ( $_SERVER['HTTP_HOST']=='localhost' || $_SERVER['HTTP_HOST']=='localhost' ) {
    if (file_exists(dirname(__FILE__) . '/local.settings.php')) {
    include dirname(__FILE__) . '/local.settings.php';
    }
    } else { // Elsewhere
    if (file_exists(dirname(__FILE__) . '/stage.settings.php')) {
    include dirname(__FILE__) . '/stage.settings.php';
    }

    }
  3. chrisl8888 revised this gist Mar 28, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion settings-router.php
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    * settings file routing
    */
    // Localhost
    if ( $_SERVER['HTTP_HOST']==localhost || $_SERVER['HTTP_HOST']==localhost ) {
    if ( $_SERVER['HTTP_HOST']=='localhost' || $_SERVER['HTTP_HOST']=='localhost' ) {
    if (file_exists(dirname(__FILE__) . '/local.settings.php')) {
    include dirname(__FILE__) . '/local.settings.php';
    }
  4. chrisl8888 created this gist Sep 22, 2011.
    18 changes: 18 additions & 0 deletions settings-router.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    /*
    * At the end of the settings.php file for drupal add these lines
    */

    /**
    * settings file routing
    */
    // Localhost
    if ( $_SERVER['HTTP_HOST']==localhost|| $_SERVER['HTTP_HOST']==localhost’ ) {
    if (file_exists(dirname(__FILE__) . '/local.settings.php')) {
    include dirname(__FILE__) . '/local.settings.php';
    }
    } else { // Elsewhere
    if (file_exists(dirname(__FILE__) . '/stage.settings.php')) {
    include dirname(__FILE__) . '/stage.settings.php';
    }

    }