Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Acquia Cloud Site Factory Environment Detection
* Acquia Cloud Site Factory Environment detection examples.
// This may require the ACSF module to be installed.
// @see
$site settings = [
'site' => '',
'env' => '',
if (!empty($GLOBALS['gardens_site_settings'])) {
$site_settings = $GLOBALS['gardens_site_settings'];
// $stage will print the current environment name.
require_once '/var/www/site-scripts/site-info.php';
list($name, $group, $stage, $secret) = ah_site_info();

This comment has been minimized.

Copy link
Owner Author

@geerlingguy geerlingguy commented Apr 28, 2016

It seems like the code in 16-18 is preferred in terms of reliability and non-dependence on the ACSF connector module. Regardless, there are a couple ways you can get at environment config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.