Same name and namespace in other branches
  1. 10 core/includes/common.inc \base_path()
  2. 4.7.x includes/common.inc \base_path()
  3. 6.x includes/common.inc \base_path()
  4. 7.x includes/common.inc \base_path()
  5. 8.9.x core/includes/common.inc \base_path()
  6. 9 core/includes/common.inc \base_path()

Returns the base URL path of the Drupal installation. At the very least, this will always default to /.

Related topics

20 calls to base_path()
chameleon_page in themes/chameleon/chameleon.theme
db_connect in includes/database.mysql.inc
Initialize a database connection.
db_connect in includes/database.mysqli.inc
Initialise a database connection.
db_connect in includes/database.pgsql.inc
Initialize a database connection.
drupal_build_css_cache in includes/common.inc
Aggregate and optimize CSS files, putting them in the files directory.

... See full list

File

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

Code

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