Problem retrieving root directory

I am building a dynamic site so certain includes will happen from different file directories, as such I need them to be dynamic so I was attempting to manage them using:

<?php echo $_SERVER[‘SITE_HTMLROOT’] . “/somedir/css/mycssfile.css”;

And it APPEARED to fix the issue, but now since I turned on error reporting I am not sure since I am receiving this error:

Notice: Undefined index: SITE_HTMLROOT in /var/www/vhosts/mydomain.com/httpdocs/somedir/inc_header.inc on line 14

Anyone have any ideas why this might be and a possible solution? Let me know if you need more detailed info.

Greg

Where did you come up with SITE_HTMLROOT ? That doesn’t exist unless you create it yourself.

Check out the manual for accepted indexes: http://php.net/manual/en/reserved.variables.server.php

I have a feeling you’re looking for DOCUMENT_ROOT.

That was it exactly! Why is it when you put up a question then receive an answer you typically realize it was just you being stupid and not thinking the problem through all the way? Simple answer that I should have known… unfortunately, there WILL be more instances from me I’m sure!
Thanks a bunch!
Greg