Is there an easy way in php of obtaining the document root for virtual domains?
For example, apache is usually configured to serve pages from /usr/local/apache2/htdocs
So if I do
<?
echo $_SERVER['DOCUMENT_ROOT'];
?>
I'd get /usr/local/apache2/htdocs.
However, many domains can be hosted on one IP using virtualhosts config.
How do I obtain the document_root for those domain in php?