Forum Moderators: coopster
The problem I am having is with the refs. Pages at the root of the site will only properly call the incuded files if I right the ref like this <?php include "xyz/inc/xyz.php"?> and that makes sence. However, when I try to make links relitave like <?php include "../xyz/inc/xyz.php"?> I get error messages when I view the page saying no such luck basically. But, pages that are in subdirectories like this. Tried "/xyz/" too, but no luck. I also tried using the full url of the site, but that gave me the same problem no matter where the file was.
I would really like to be about to keep using my template the way it was supposed to be used and have files in subdirectories. I hate throwing all my files in the root directory. Can any body tell me what I am doing wrong?
Sorry if this seems like a dumb question. I am pretty new to PHP, mostly a graphics and css jock. I have never had this kind of problem with just xhtml.
have you tried the doc root way?
include $_SERVER['DOCUMENT_ROOT'] . '/path/to/template.php';
that's really the best way to do it, not sure if DW will like that or not. The other option might be to look around for a setting that sets the root directory. I am not sure if there is one but there should be.