title: Difference between $_SERVER['DOCUMENT_ROOT'] and $_SERVER['HTTP_HOST']
body: <p>I am back with a simple question (or related question).</p>
  
  <p>The question is simple however I have not received an answer yet. I have asked many people with different experience in PHP. But the response I get is: "I don't have any idea. I've never thought about that." Using Google I have not been able to find any article on this. I hope that I will get a satisfying answer here.</p>
  
  <p>So the question is:</p>
  
  <p>What is the difference between <code>$_SERVER['DOCUMENT_ROOT']</code> and <code>$_SERVER['HTTP_HOST']</code> ?</p>
  
  <p>Are there any advantages of one over the other?</p>
  
  <p>Where should we use HTTP_HOST &amp; where to use DOCUMENT_ROOT?</p>