Hi everybody !

I need to find the function that will return me : "/usr/share/drupal5" on my development computer and "/var/www/drupal5" on my production server ... the path between the root directory and drupal installation folder ...

I've tried drupal_path(), $base_url, but none gave me the result and I can't find it in the API !

If you know how to do, please share your knowledge :-)

thanks

Hugo

Comments

erle’s picture

$_SERVER['DOCUMENT_ROOT']

might do it, but I am surprised that base_path() did not do it. I remember reading that base_path was in fact the recommended option...

hugoperry’s picture

base_path() returns "/" and $_SERVER['DOCUMENT_ROOT'] returns what I expect !!! :-)

thanks very much erle for your rapidity !!