You're installing a script. You're moving along, doing fine, when suddenly you need to know the document root. How can you find it? Well you could e-mail tech support and wait 15 hours for them to let you know, or you could use a simple PHP script with getenv ()
. Here's how:
//Gets the document root
$root = getenv("DOCUMENT_ROOT") ;
And that's all. These few lines of code should return the document root. Hopefully keeping this small script around will save you future install headaches.