It is sometimes necessary to refer to files in the host filesystem explicitly. By retrieving this information dynamically instead of hard coding it, moving the code from one server or hosting company to another is much simpler.
The fully qualified path of the directory containing the root of the web documents is:
To assign the fully qualified path of images/sadie.gif to the variable $pic:
$var = $_SERVER["SITE_HTMLROOT"].'/images/sadie.gif';