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:
" [ ] " implies it is a FOLDER
Installed on my C:\ drive
[xampp]
└── [htdocs]
└── [QMS]
└── [rev3]
├── [css]
├── [js]
├── [DPU]
├── [login]
├── index.php
├── header.php
└── config.php
In my "config.php" file I tried to define a root path (this may be the error):
$path = $_SERVER['DOCUMENT_ROOT'] . "/QMS/rev3/";
.
Then in my header.php file I have:
<?php
require $_SERVER['DOCUMENT_ROOT'] . "/QMS/rev3/config.php";
include $_SERVER['DOCUMENT_ROOT'] . "/QMS/rev3/login/session.php";
.....
?>
HTML - located in the <head> section
<link rel='stylesheet' type='text/css' href='<?php echo $path . "css/searchBar.css"; ?>'/>
<link rel='stylesheet' type='text/css' href='<?php echo $path . "css/tables/filtergrid.css"; ?>'/>
<script type="text/javascript" language="javascript" src='<?php echo $path . "js/jquery.dataTables.js" ?>'></script>
<script type="text/javascript" language="javascript" src='<?php echo $path . "js/jquery.loader.js" ?>'></script>
... MANY OTHER scripts and stylesheets.
. My index.php is:
require $_SERVER['DOCUMENT_ROOT'] . "/QMS/rev3/header.php";
When I launch this in Chrome - I get the following errors for ALL of my scripts and stylesheets (19 errors total):
"NOT ALLOWED TO LOAD LOCAL RESOURCE file///C:/xampp/htdocs/QMS/rev3/ ......etc..."
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?
.