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:

▾ 16 functions call base_path()

color_scheme_form_submit in modules/color/color.module
Submit handler for color change form.
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.
install_check_requirements in ./install.php
Check installation requirements and report any errors.
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
theme_color_scheme_form in modules/color/color.module
Theme the color form.
update_helpful_links in ./update.php
update_info_page in ./update.php
update_results_page in ./update.php
url in includes/common.inc
Generate a URL.
_color_page_alter in modules/color/color.module
Callback for the theme to alter the resources used.
_color_rewrite_stylesheet in modules/color/color.module
Rewrite the stylesheet to match the colors in the palette.

Code

includes/common.inc, line 3060

<?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.