You are here

constant DRUPAL_ROOT in Drupal 10

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

Defines the root directory of the Drupal installation.

This strips two levels of directories off the current directory.

50 uses of DRUPAL_ROOT
BaseThemeMissingTest::setUpFilesystem in core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php
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.

... See full list

File

core/includes/bootstrap.inc, line 61
Functions that need to be loaded on every Drupal request.

Code

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