DRUPAL_ROOT

Same name in other branches
  1. 7.x cron.php \DRUPAL_ROOT
  2. 7.x xmlrpc.php \DRUPAL_ROOT
  3. 7.x index.php \DRUPAL_ROOT
  4. 7.x authorize.php \DRUPAL_ROOT
  5. 7.x update.php \DRUPAL_ROOT
  6. 7.x modules/simpletest/tests/http.php \DRUPAL_ROOT
  7. 7.x modules/simpletest/tests/https.php \DRUPAL_ROOT
  8. 7.x modules/statistics/statistics.php \DRUPAL_ROOT
  9. 7.x install.php \DRUPAL_ROOT
  10. 9 core/includes/bootstrap.inc \DRUPAL_ROOT
  11. 8.9.x core/includes/bootstrap.inc \DRUPAL_ROOT
  12. 10 core/includes/bootstrap.inc \DRUPAL_ROOT

Defines the root directory of the Drupal installation.

This strips two levels of directories off the current directory.

60 uses of DRUPAL_ROOT
BrowserHtmlDebugTrait::initBrowserOutputFile in core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php
Creates the directory to store browser output.
ConfigInstallProfileUnmetDependenciesTest::copyTestingOverrides in core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php
Copy the testing_config_overrides install profile.
ConfigTranslationInstallTest::setUpLanguage in core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php
CredentialForm::getDatabaseTypes in core/modules/migrate_drupal_ui/src/Form/CredentialForm.php
Returns all supported database driver installer objects.
CredentialFormTest::testCredentialFrom in core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php
Test the credential form.

... See full list

File

core/includes/bootstrap.inc, line 45

Code

define('DRUPAL_ROOT', dirname(__DIR__, 2));

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.