Unable to access global variable defined in settings.php [Drupal]
- by Senthil
I am developing a website using Drupal 6.16.
I want to define a variable in settings.php like
$ge_path = 'some/path/here';
And I want to use it inside my modules.
function mymodule_block(....) {
global $ge_path;
$fullPath = $ge_path . '/another/path';
doSomething($fullPath);
}
But I am getting NULL as the value of $ge_path.
Why am I not able to access the global variable defines in settings.php? How can I get the proper value inside my module functions?
The funny thing is, I am able to access $db_url['default'] and $db_url['mydatabase'] etc.. which are defined just two lines above $ge_path in settings.php!