title: Where is Doc Root
body: <p>When I run this code on my localhost</p>
  
  <pre><code>$root = $_SERVER['DOCUMENT_ROOT'];
  echo "Doc root : $root &lt;br /&gt;";
  </code></pre>
  
  <p>it responds with:</p>
  
  <pre><code>Doc root : C:/wamp/public_html/ 
  </code></pre>
  
  <p>When I run the same code on my remote server it responds with:</p>
  
  <pre><code>Doc root : /home/setine5/public_html
  </code></pre>
  
  <p>Notice that it does not have a trailing "/"</p>
  
  <p>I'm trying to find a way to reference the same piece of PHP on both my localhost and remote server but cannot because of the missing forward slash.</p>
  
  <p>How is this done normally?</p>