[development] DRUPAL_ROOT const in 7.0

Jamie Holly hovercrafter at earthlink.net
Mon Feb 7 14:16:58 UTC 2011


Check out these issues on it:

http://drupal.org/node/259623

http://drupal.org/node/319154

Jamie Holly
http://www.intoxination.net
http://www.hollyit.net


On 2/7/2011 4:43 AM, Massar Dev-Team wrote:
> 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/
>


More information about the development mailing list