[development] How implement global variables that vary depending on the server (i.e. production, test, demo) within Drupal?

John Fiala jcfiala at gmail.com
Thu Mar 17 17:43:58 UTC 2011


On Thu, Mar 17, 2011 at 11:40 AM, John Mitchell <mitchelljj98 at gmail.com> wrote:
> For java webapps within Apache Tomcat I use a web.xml file which contains
> the global variables that are specific to that server so that the production
> server will have one web.xml file and the test server will have a different
> web.xml file.
>
> How can I do something similar for global variables that vary depending on
> the server (i.e. production, test, demo) within Drupal?
>

Well, I usually put those in the setting.php files.  For one thing,
anything you set as $conf['blah'] in settings.php will then be the
value when the code does variable_get('blah') later on.



-- 
John Fiala
www.jcfiala.net


More information about the development mailing list