Either way, don't forget to mark this thread resolved.
As an example, however, this worked as expected for me:
echo realpath($_SERVER['DOCUMENT_ROOT'] . '/..');
output was 'D:\Program Files (x86)\Apache Software Foundation\Apache2.2' (which is as expected, since my document root is located at 'D:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs').