problem with using include files
| From: | Ivan Carey | Date: | Tue, 27 Aug 2002 12:50:16 +0000 |
| Subject: | problem with using include files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-114247@lists.php.net to get a copy of this message | ||
Hello
The problem I have when using include files is the path to different parts of the web site.
To Explain:
I have a header.inc file in an inc directory:
root
|___inc
| |___header.inc
|
|___images
| |___topbar_01.gif
|
|___faq
|___faq.php
In the header.inc file there is:
<img name="topbar_01" src="images/topbar_01.gif" width=783 height=56>
now when I include this into the faq.php file I do not display the topbar_01.gif as the path to
topbar_01.gif is now
/root/faq/images/topbar_01.gif
I would like to be able to use a header.inc file so that I can update the entire site simply.
Is there a way I can specify the correct path when using an include file in this way?
I have tried to use some of the Environment Variables.
I find that I am having this problem when I am using a structured site. I would rather not place all
files into the same directory
Thankyou for your reply,
Ivan