Skip navigation
Help

base_path

6 common.inc base_path()
7 common.inc 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:

30 calls to base_path()

9 string references to 'base_path'

File

drupal/includes/common.inc, line 2684
Common functions that many Drupal modules will need to reference.

Code

function base_path() {
  return $GLOBALS['base_path'];
}