Created
October 28, 2014 15:49
-
-
Save bkozora/e20cf36dc786ef5af50c to your computer and use it in GitHub Desktop.
Failsafe Production Database Connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$useDevDb = false; | |
if (isset($_SERVER['ENVIRONMENT']) && $_SERVER['ENVIRONMENT'] == 'PRODUCTION') { | |
$useDevDB = false; | |
} elseif ((isset($_SERVER['ENVIRONMENT'])) | |
&& $_SERVER['ENVIRONMENT'] == 'DEVELOPMENT' | |
|| $_SERVER['ENVIRONMENT'] == 'BETA') { | |
$useDevDB = true; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment