Copy link to clipboard
Copied
I am trying to use SSI in my header and it will not show the image if the page is to deep in my files:
Does not work:
http://www.campingcoaches.com/states/oregon/oregon.php The code is <?php include("../../includes/header2.php"); ?>
but is I move it up on level:
http://www.campingcoaches.com/states/colorado.php the Code is <?php include("../includes/header2.php"); ?>
Then it seems to work fine
I have also tried to make the header relative to the site root at that point I got a error message.
http://www.campingcoaches.com/states/oregon/oregon.php you can see the code error
The menus both use the same Code and they work?
<?php include("../../includes/menu2.php"); ?>
I am playing around and learning this so my knowledge base is relitively thin but I enjoy computers and the outdoors. Bottom line be gentle and assume you are I know very little at age 50 and just getting started.
This was already posted in Adobe Forums > Dreamweaver > Dreamweaver Development Toolbox > PHP Application Development > Discussions without a response so I thought i might be in the wrong area.
Thank you for any help that might be offered,
Gene
All it takes for Evil to thrive is for good people to do NOTHING
As I suspected. All links in include files must be root relative links, not document relative ones.
This link does not work -
<img src="../images/family 2.jpg" (document relative)
while this link does work -
<a class="MenuBarItemSubmenu" href="/index.php"> (root relative)
Make all links in your include files be root relative, and you'll never have a problem.
Copy link to clipboard
Copied
http://www.campingcoaches.com/states/oregon/oregon.php The code is <?php include("../../includes/header2.php"); ?>
Show us the code in header2.php, please.
Copy link to clipboard
Copied
The header that does not work
<div align="right"><img src="../images/family 2.jpg" width="320" height="226" /><img src="../images/hiking mountain ridge 2.jpg" width="760" height="226" /></div>
The menus are that works is:
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="/index.php">Home</a></li>
<li><a href="#">RV Camping</a></li>
<li><a href="#">Tent Camping</a></li>
<li><a href="/Googlemaptest_3.php">Back Packing</a>
<ul>
<li><a href="#">Trails</a></li>
<li><a href="/Googlemaptest_4.php" class="MenuBarItemSubmenu">Local Hikes</a>
<ul>
<li><a href="#">Pacific Crest Trail</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">With the Kids</a></li>
<li><a href="#">Camping Tips</a></li>
<li><a href="#">Ask a Friend</a></li>
<li><a href="/web_pages/about_us.php">About us</a></li>
</ul>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
if you need anything else just let me know.
Gene
Copy link to clipboard
Copied
As I suspected. All links in include files must be root relative links, not document relative ones.
This link does not work -
<img src="../images/family 2.jpg" (document relative)
while this link does work -
<a class="MenuBarItemSubmenu" href="/index.php"> (root relative)
Make all links in your include files be root relative, and you'll never have a problem.
Copy link to clipboard
Copied
Perfect, thank you some much for taking the time to help beginners like me sorry it took so long to reply I thought I already responded
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more