Created
November 13, 2014 16:08
-
-
Save sideshowcoder/251bfe82128958901c20 to your computer and use it in GitHub Desktop.
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
if (null !== getenv("DATABASE_URL")) { | |
$db = parse_url(getenv("DATABASE_URL")); | |
define("DB_NAME", trim($db["path"],"/")); | |
define("DB_USER", $db["user"]); | |
define("DB_PASSWORD", $db["pass"]); | |
define("DB_HOST", $db["host"]); | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', ''); | |
} else { | |
die("Your heroku DATABASE_URL does not appear to be correctly specified."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment