I have this path and this is correct, however the browser will not include the source file unless I put "file: ///" in front of it. I am still developing, and it will ultimately be on a Linux machine, but in the meantime, I would like to see my work and also eliminate it. Is there any solution for this?
This fails:
C:\Program Files (x86)\work\site\js\rowlock.js
This does not work:
file:///C:\Program Files (x86)\work\site\js\rowlock.js
Try using the $ _SERVER ['DOCUMENT_ROOT'] variable to make your script independent. For example:
include($_SERVER['DOCUMENT_ROOT'].'/js/rowlock.js');
Works great on any system
just use front slashes everywhere if you move this to linux anyway. php for windows can figure it out.
$file='c:/Program Files (x86)/work/site/js/rowlock.js';
Place quotation marks around your path. You have spaces, so they are not read correctly.
'C:\Program Files (x86)\work\site\js\rowlock.js'
Where is your root folder located?
If its C: \ Program Files (x86) \ work \ site \
Then skip access to your file like this
Js / rowlock.js
Assuming js is in the root folder