Skip to content

Instantly share code, notes, and snippets.

@jmickela
Created September 8, 2016 03:38
Show Gist options
  • Save jmickela/8e6da0bd2eacd75c8969ffb4762bdd44 to your computer and use it in GitHub Desktop.
Save jmickela/8e6da0bd2eacd75c8969ffb4762bdd44 to your computer and use it in GitHub Desktop.
Snipped of settings.php that shows the environment specific include files
<?php
// SNIP REST OF settings.php ABOVE
if(defined('PANTHEON_ENVIRONMENT')) {
switch(PANTHEON_ENVIRONMENT) {
case 'live':
$env_settings = dirname(__FILE__) . '/settings.live.php';
break;
case 'test':
$env_settings = dirname(__FILE__) . '/settings.test.php';
break;
case 'dev':
$env_settings = dirname(__FILE__) . '/settings.dev.php';
break;
default:
//This will be multidev instances - use dev settings
$env_settings = dirname(__FILE__) . '/settings.dev.php';
break;
}
if (file_exists($env_settings)) {
include $env_settings;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment