error occurred in defining server file path
<p>I have defined file path like-</p>

<pre><code>$docRoot = $_SERVER['DOCUMENT_ROOT'];

$webRoot  = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);

define('WEB_ROOT', $webRoot);
</code></pre>

<p>and used in my corresponding pages like-</p>

<pre><code>&lt;a href="&lt;?php echo WEB_ROOT; ?&gt;admin/" class="leftnav"&gt;Home&lt;/a&gt; 
  &lt;a href="&lt;?php echo WEB_ROOT; ?&gt;admin/category/" class="leftnav"&gt;Category&lt;/a&gt;
  &lt;a href="&lt;?php echo WEB_ROOT; ?&gt;admin/product/" class="leftnav"&gt;Product&lt;/a&gt; 
</code></pre>

<p>but when I run this program on localhost I works fine but on server when I click on these hyper-links this gives following error-<br>
<strong>Firefox doesn't know how to open this address, because the protocol (d) isn't associated with any program.</strong>
and if I view page source the href path of these link are -</p>

<pre><code>&lt;a href="D:/Hosting/6448289/html/products/admin/category/" class="leftnav"&gt;Category&lt;/a&gt;
  &lt;a href="D:/Hosting/6448289/html/products/admin/product/" class="leftnav"&gt;Product&lt;/a&gt; 
</code></pre>
