Home ›
Find out what sites directory Drupal is currently usingFind out what sites directory Drupal is currently using
Submitted by Benjamin Melançon on April 29, 2009 - 9:30am
The answer is conf_path().
The backstory is we are making a new 'modules', 'themes', or 'files' level folder inside sites/whatever: 'config', to store configuration settings in files.
This would be the ultimate way to get a listing of all ini files in modules, and could do the same thing for 'config' -- this grabs from the currently in use sites directory (such as sites/default) as well as sites/all, profiles, and the built-in modules directory:
drupal_system_listing('.ini$', 'modules', 'name', 0);
Put to get a module at a time, roll our own with http://api.drupal.org/api/function/conf_path/6
Unless 'modules' could be 'modules/modulename'? No, too many modules live in their parent modules as subdirectories.
Resolution
Searched words:
drupal active site directory
drupal sites folder
File-based configuration settings
Comments
Post new comment