title: Problem with $_SERVER['DOCUMENT_ROOT']
body: <p>I have a simple problem with the server global variable named : DOCUMENT_ROOT.</p>
  
  <p>Here's my config.php file :</p>
  
  <pre><code>&lt;?php
  define ('UPLOAD_DIR',$_SERVER['DOCUMENT_ROOT'].'/resouces/');
  </code></pre>
  
  <p>The test.php file </p>
  
  <pre><code>&lt;?php
  
  $photo='myimage.php';
  echo '&lt;img src="'.UPLOAD_DIR.$photo.'"&gt;';
  </code></pre>
  
  <p>The problem is that when testing the code.. The image doesn't display, and the directory starts with : </p>
  
  <blockquote>
    <p>C://program files/easyPHP/www/resources</p>
  </blockquote>
  
  <p>instead of </p>
  
  <blockquote>
    <p><a href="http://127.0.0.1:8888/" rel="nofollow noreferrer">http://127.0.0.1:8888/</a></p>
  </blockquote>
  
  <p>As it supposed to be... I tried to update this line in the httpd.conf file :</p>
  
  <pre><code>DocumentRoot "${path}/www"
  </code></pre>
  
  <p>to </p>
  
  <pre><code>DocumentRoot "http://127.0.0.1:8888/www"
  </code></pre>
  
  <p>But the server declares an error : </p>
  
  <p><img src="https://i.stack.imgur.com/M0IOF.jpg" alt="enter image description here"></p>
  
  <p>Thank you in advance :-)</p>