[development] DRUPAL_ROOT const in 7.0

Massar Dev-Team massar.drupal at gmail.com
Mon Feb 7 09:43:21 UTC 2011


In Drupal v7.0 index.php file:

define('DRUPAL_ROOT', getcwd());

What is the point of using getcwd() and not
dirname(__FILE__)
instead?
getcwd() will rely on the directory set by web server, right? while
dirname(__FILE__)
is independent.

I used to hack bootstrap.inc in Drupal-6.x to add this constant, but now it
appears in every .php file directly inside the Drupal directory, what about
moving it to bootstrap.inc?

Thanks,
-- 
----------------------
http://massar.sy/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110207/e174b44f/attachment.html 


More information about the development mailing list