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:

▾ 8 functions call base_path()

drupal_add_js in includes/common.inc
Add a JavaScript file, setting or inline code to the page.
drupal_build_css_cache in includes/common.inc
Aggregate and optimize CSS files, putting them in the files directory.
file_icon_url in modules/file/file.module
Given a file object, create a URL to a matching icon.
search_index in modules/search/search.module
Update the full-text search index for a particular item.
system_requirements in modules/system/system.install
Test and report Drupal installation requirements.
template_preprocess_maintenance_page in includes/theme.inc
The variables generated here is a mirror of template_preprocess_page(). This preprocessor will run it's course when theme_maintenance_page() is invoked. It is also used in theme_install_page() and theme_update_page() to keep all the variables...
template_preprocess_page in includes/theme.inc
Preprocess variables for page.tpl.php
url in includes/common.inc
Generate a URL.

Code

includes/common.inc, line 3023

<?php
function base_path() {
  return $GLOBALS['base_path'];
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.