1. 7 modules/simpletest/tests/http.php DRUPAL_ROOT
  2. 7 modules/simpletest/tests/https.php DRUPAL_ROOT
  3. 7 modules/statistics/statistics.php DRUPAL_ROOT
  4. 7 update.php DRUPAL_ROOT
  5. 7 xmlrpc.php DRUPAL_ROOT
  6. 7 authorize.php DRUPAL_ROOT
  7. 7 install.php DRUPAL_ROOT
  8. 7 cron.php DRUPAL_ROOT
  9. 7 index.php DRUPAL_ROOT
  10. 8 core/includes/bootstrap.inc DRUPAL_ROOT

Defines the root directory of the Drupal installation.

158 uses of DRUPAL_ROOT
aggregator_test_feed in modules/aggregator/tests/aggregator_test.module
Page callback. Generates a test feed and simulates last-modified and etags.
authorize.php in ./authorize.php
Administrative script for running authorized file operations.
authorize_get_filetransfer in includes/authorize.inc
Gets a FileTransfer class for a specific transfer method and settings.
authorize_run_operation in includes/authorize.inc
Runs the operation specified in $_SESSION['authorize_operation'].
BatchPercentagesUnitTestCase::setUp in modules/simpletest/tests/batch.test
Sets up unit test environment.

... See full list

File

./install.php, line 11
Initiates a browser-based installation of Drupal.

Code

define('DRUPAL_ROOT', getcwd())

Comments

what about

<?php
define
('DRUPAL_ROOT', dirname(__FILE__));
?>

?

getcwd() !!, it looks like it relays on the directory set by the web server, well, Apache will do it, will all other do?

Please open an issue against core if you want to suggest/request changes. Nothing in the the API docs discussion threads will be directly actioned.