function base_path
Same name and namespace in other branches
- 6.x drupal-6.x/includes/common.inc \base_path()
Returns the base URL path (i.e., directory) of the Drupal installation.
base_path() adds a "/" to the beginning and end of 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/".
24 calls to base_path()
- AJAXFrameworkTestCase::testAJAXRender in drupal-7.x/
modules/ simpletest/ tests/ ajax.test - Test that ajax_render() returns JavaScript settings generated during the page request.
- color_scheme_form_submit in drupal-7.x/
modules/ color/ color.module - Form submission handler for color_scheme_form().
- CommonURLUnitTest::testUrl in drupal-7.x/
modules/ simpletest/ tests/ common.test - Test url() with/without query, with/without fragment, absolute on/off and assert all that works when clean URLs are on and off.
- drupal_add_js in drupal-7.x/
includes/ common.inc - Adds a JavaScript file, setting, or inline code to the page.
- FileURLRewritingTest::testPublicCreatedFileURL in drupal-7.x/
modules/ simpletest/ tests/ file.test - Test the generating of rewritten public created file URLs.
2 string references to 'base_path'
- template_preprocess_maintenance_page in drupal-7.x/
includes/ theme.inc - Process variables for maintenance-page.tpl.php.
- template_preprocess_page in drupal-7.x/
includes/ theme.inc - Preprocess variables for page.tpl.php
Archivo
- drupal-7.x/
includes/ common.inc, line 2817 - Common functions that many Drupal modules will need to reference.
Código
function base_path() {
return $GLOBALS['base_path'];
}