Created
July 11, 2013 01:10
-
-
Save bwsewell/5971695 to your computer and use it in GitHub Desktop.
An easy way to grab MySQL environment variables from an AppFog bound service
This file contains 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 | |
$services_json = json_decode(getenv("VCAP_SERVICES"),true); | |
$mysql_config = $services_json["mysql-5.1"][0]["credentials"]; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment