1 common.inc | base_path() |
Returns the base path (i.e., directory) of the Backdrop installation.
base_path() adds a "/" to the beginning and end of the returned path if the path is not empty. At the very least, this will return "/".
Examples:
- http://example.com returns "/" because the path is empty.
- http://example.com/backdrop/folder returns "/backdrop/folder/".
File
- core/
includes/ common.inc, line 3354 - Common functions that many Backdrop modules will need to reference.
Code
function base_path() {
return $GLOBALS['base_path'];
}