Results 1 to 6 of 6
Jul 26, 2011, 05:13 #1
Problem with variable in subdirectory
I'm currently restructuring my sites file structure to certain pages are in subdirectories instead of the root. So for example
In each php file I have the meta data and page section declared in variables, then I include the header, so the top of each page looks like this...
$content="this is the meta content";
$title="this is the title";
$pagesection="this is the page identifier";
But when I move the file into a subdirectory...
...it includes the header, but doesn't pull in the variables, so the meta date and page section don't display in the source.
Can anyone tell me why this would be happening?
Thanks in advance!
Jul 26, 2011, 05:34 #2
Try including the header like soPHP Code:
Jul 26, 2011, 05:46 #3
Thanks for the help!
But it didn't pull in the header. The header.php is in the root, so not sure why it isn't working. Is the above correct?
Jul 26, 2011, 05:51 #4
Jul 26, 2011, 06:19 #5
- Join Date
- Feb 2006
- Atlanta, GA, USA
- 48 Post(s)
- 0 Thread(s)
(Hint: $_SERVER['DOCUMENT_ROOT'] )
Jul 26, 2011, 07:15 #6
Bingo... that worked!
Thanks so much for your help!