php include or require ignore DOCUMENT_ROOT
This is a typical line I have at the top of my php. If Dreamweaver would simply allow me to say "ignore" the "$_SERVER['DOCUMENT_ROOT']." part of this line, the file path would be correct as it is relative to the web folder. If I remove that section the file appears at the top and I can click on it to view its source. It doesn't work of course since it's a full path on the server but it lets me view in DW.
I should be able to set DW to ignore what I tell it to. If it would ignore the document_root element of the server array, it would work for both cases. I always put document_root into my require or includes. You never know where you will be in the path and you have to include many files that are in the same directory from anywhere in the site.
The forward slash at the beginning works for JS and CSS but that's relative to the root of the URL not the server the PHP code is running on.