Hi,

I have a quick question...
Is there a drupal function that I can call to get the location of the settings.php file? Ie something that when called returns:

/srv/www/drupal/sites/default/settings.php

...? (this obviously needs to refer to the settings.php file which is currenly in use!

Thanks!

Merc.

Comments

voidengine’s picture

global $conf; print $conf[file_directory_path];

... returns 'sites/default/files'. Then a little string function might get you there.

cog.rusty’s picture

That must be conf_path()

http://api.drupal.org/api/function/conf_path/5

I don't think it is stored anywhere, probably because it can be moved any moment.

mercmobily’s picture

Thanks a lot!