base_path
- Versions
- 4.7 – 7
base_path()
Return the base URL path (i.e., directory) of the Drupal installation.
base_path() prefixes and suffixes a "/" onto 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/drupal/folder returns "/drupal/folder/".
Code
includes/common.inc, line 3023
<?php
function base_path() {
return $GLOBALS['base_path'];
}
?>Login or register to post comments 