How can we improve Adobe Dreamweaver?

php include or require ignore DOCUMENT_ROOT

require_once($_SERVER['DOCUMENT_ROOT']."/_includes/dbopen.php");

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.

4 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base