title: including files with $_SERVER['DOCUMENT_ROOT'] on localhost
body: <p>I just moved my site to my local computer(a mac) but the site is not able to load properly because the include files doesn't seem to be able to include properly. </p>
  
  <p>say eg: </p>
  
  <p>I have the following lines: </p>
  
  <pre><code>include($_SERVER['DOCUMENT_ROOT'].'/pages/includes/functions.php'); 
  </code></pre>
  
  <p>on my index.php but the files are not able to be included properly. </p>
  
  <p>I tried to use the functions in the file but it doesn't seem to be able to run the functions properly as per online.</p>
  
  <p>I tried echo-ing <code>$_SERVER['DOCUMENT_ROOT']</code> but it shows: <code>/Applications/MAMP/htdocs</code></p>
  
  <p>I'm not sure if that is the full path or if there is anything else i need to add to the url to get my files to be properly included. Perhaps i'm missing something. Any help will be greatly appreciated.</p>