Re-reading your original post, I wonder if this is what you are after?
<?php
$r = ini_get('doc_root');
echo 'Doc root is ' . $r;
?>
Perhaps it is doubtful on a shared server, but maybe you have your own ini file?
Re-reading your original post, I wonder if this is what you are after?
<?php
$r = ini_get('doc_root');
echo 'Doc root is ' . $r;
?>
Perhaps it is doubtful on a shared server, but maybe you have your own ini file?