title: PHP XAMPP Server DOCUMENT_ROOT folder structure
body: <p>So this is my first time creating a test site with xampp. I originally had all my php files in one folder and just recently decided to organize the data (yes, hindsight i should've started with an organized folder structure.) Anyways, I have my setup like this:</p>
  
  <p>" [  ] " implies it is a FOLDER</p>
  
  <p>Installed on my C:\ drive</p>
  
  <pre><code>[xampp]
  └── [htdocs]
      └── [QMS]
          └── [rev3]
              ├── [css]
              ├── [js]
              ├── [DPU]
              ├── [login]
              ├── index.php
              ├── header.php
              └── config.php
  </code></pre>
  
  <p>In my "config.php" file I tried to define a root path (this may be the error):</p>
  
  <pre><code>$path = $_SERVER['DOCUMENT_ROOT'] . "/QMS/rev3/";
  </code></pre>
  
  <p>.</p>
  
  <p>Then in my header.php file I have:</p>
  
  <pre><code>&lt;?php
  require $_SERVER['DOCUMENT_ROOT'] . "/QMS/rev3/config.php";
  include $_SERVER['DOCUMENT_ROOT'] . "/QMS/rev3/login/session.php";
  .....
  ?&gt;
  
  HTML - located in the &lt;head&gt; section
  
  &lt;link rel='stylesheet' type='text/css' href='&lt;?php echo $path . "css/searchBar.css"; ?&gt;'/&gt;
  &lt;link rel='stylesheet' type='text/css' href='&lt;?php echo $path . "css/tables/filtergrid.css"; ?&gt;'/&gt;
  &lt;script type="text/javascript" language="javascript" src='&lt;?php echo $path . "js/jquery.dataTables.js" ?&gt;'&gt;&lt;/script&gt;
  &lt;script type="text/javascript" language="javascript" src='&lt;?php echo $path . "js/jquery.loader.js" ?&gt;'&gt;&lt;/script&gt;
  
  ... MANY OTHER scripts and stylesheets.
  </code></pre>
  
  <p>.
  My index.php is:</p>
  
  <pre><code>require $_SERVER['DOCUMENT_ROOT'] . "/QMS/rev3/header.php";
  </code></pre>
  
  <p>When I launch this in Chrome - I get the following errors for ALL of my scripts and stylesheets (19 errors total):</p>
  
  <pre><code>"NOT ALLOWED TO LOAD LOCAL RESOURCE  file///C:/xampp/htdocs/QMS/rev3/ ......etc..."
  </code></pre>
  
  <p>My site was working perfectly when all my files were in the same folder and I wasn't using SERVER['DOCUMENT_ROOT'], but now I have no idea what to do...any advice?</p>
  
  <p>.</p>