[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    Re: [PHP] problem with using include files
From:       "Stas Maximov" <maximov () eircom ! net>
Date:       2002-08-27 13:06:29
[Download RAW message or body]

<img name="topbar_01" src="/images/topbar_01.gif" width=783 height=56>
This should help you. This way the browser will look for images directory in
the root of your webserver.

Regards, Stas

----- Original Message -----
From: "Ivan Carey" <icarey@bigpond.com>
To: <php-general@lists.php.net>
Sent: Tuesday, August 27, 2002 1:50 PM
Subject: [PHP] problem with using include files


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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic