PHP Includes and Dreamweaver
Posted: Wed Feb 19, 2003 12:38 pm
With standard A HREF, IMG SRC, and serverside includes, one can simply use /filename and it will reference the file in the document root folder, which is awesome for those of us who work with multiple clients on the same machine and never need to access the server root.
The problem is, with PHP it seems to reference the server root folder when you use the same syntax in a PHP include. I learned that in order to have PHP reference the document root folder you need to add $DOCUMENT_ROOT, but that means that Dreamweaver won't display the include in its browser window, whereas it will display a <? include ("/header.html"; ?> command.
Has anyone figured a way around this? After working with server side includes that show up in Dreamweaver and work on the server, working with PHP includes that work but don't display, or display but won't work is really annoying.
The problem is, with PHP it seems to reference the server root folder when you use the same syntax in a PHP include. I learned that in order to have PHP reference the document root folder you need to add $DOCUMENT_ROOT, but that means that Dreamweaver won't display the include in its browser window, whereas it will display a <? include ("/header.html"; ?> command.
Has anyone figured a way around this? After working with server side includes that show up in Dreamweaver and work on the server, working with PHP includes that work but don't display, or display but won't work is really annoying.