Page 1 of 1

header image problem - relative path issues

Posted: Sat Sep 02, 2006 7:23 am
by stuckwithit
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi All,

i am very new to this and not too sure how to approach this problem. I have created a site with header, footer and a left menu. the site has different folders and I have managed to get the links in the menu to work across all folders. My only problem is the logo in the header and the image in the LHS menu. they keep breaking when I access the pages under the different folders..

I noticed that my virtual directory is disabled  - http://www.womenxtra.co.uk/manor-farm/version.php

[b]what do I need to do for the images in order for them to show in the sub-folders?[/b]

the site is: http://www.womenxtra.co.uk/manor-farm/

At the moment, i resolved the issue with the menu links to work across the site using these:

Code: Select all

<?php $root = '../'; ?> 

<?php include ("../left_menu.php"); ?>



for some reason they are not doing the same effect with the images...

below is my header file:


Code: Select all

<TABLE style="BORDER-BOTTOM: #6a94cc 1px solid" cellSpacing="0" cellPadding="0" width="100%" align="center" bgColor="#ffffff">
<TBODY>
<TR bgColor="#ffffff">
<TD align="left">
<a href="<?php echo $root ?>index.php">
<img src="images/LBHLogo.gif" border="0" alt="Manor Farm Site"></a>
<a href="<?php echo $root ?>index.php">
<img src="images/lbh_title.gif" border="0" alt="Manor Farm Site">

</a>
<br><br>
</TD>
<TD class="num" align="right"></TD></TR>
<TR>
<TD class="top" align="right" colSpan="2">
<a href="<?php echo $root ?>index.php">Home</a>
<a href="<?php echo $root ?>about.php">About Us</a>
<a href="<?php echo $root ?>contact.php">Contact Us</a>
<a href="<?php echo $root ?>site-map.php">Site Map</a>
</TD>
</TR>
</TBODY></TABLE>

thank you in advance.
Tala


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Sat Sep 02, 2006 9:05 am
by neophyte
Use an absolute path:

Code: Select all

include '/home/path/to/your/file';
If you're on a shared host on *nix then it's probably "/home"+"/username"+"/[www || public_html]"