doument root phpp

PHP
$RootPath = $_SERVER["DOCUMENT_ROOT"];
Source

Also in PHP: