Skip to content

Instantly share code, notes, and snippets.

@bwsewell
Created July 11, 2013 01:10
Show Gist options
  • Save bwsewell/5971695 to your computer and use it in GitHub Desktop.
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
<?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