Skip to main content
Known Participant
January 4, 2010
Question

Using $_SERVER['DOCUMENT_ROOT'] with DW [was: Can I trick Dreamweaver into...]

  • January 4, 2010
  • 1 reply
  • 568 views

Is there any way to tweak Dreamweaver CS4 into knowing what exactly...

<?php include $_SERVER['DOCUMENT_ROOT'].("/includes/_footer.php") ?>

...is referring to? (In this case, nothing... /includes is located right off the root)

However, the above variable is needed for the links to work once on the server, but it also breaks things inside Dreamweaver itself.

Ironically, if I can get DW to just *ignore* $_SERVER['DOCUMENT_ROOT']. then it would work find inside DW.

Suggestions?

[Thread moved to corrrect forum and subject line edited by moderator for clarity]

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
January 4, 2010

If you create your testing server in a virtual host, Live View will display your include files correctly. However, includes that use only HTML will not be displayed in Design view.