butzie225 Posted September 6, 2009 Share Posted September 6, 2009 Ok. I have a question, I have this code: <div id="sidebar1" class="sidebar"> <ul> <li> <h2><a href="./bots/">Bots</a></h2> <ul> <li><img src="./images/icons/combat.png" alt="xFighter Image"/> <a href="./bots/fighter/">xFighter </a><img src="./images/star.gif" alt="Star" title="Top-Seller"/ ></li> <li><img src="./images/icons/slayer.png" alt="xSlayer Image"/> <a href="./bots/slayer/">xSlayer</a></li> </ul> </li> </ul> </div> In my main directory ( / ), i have a file name called leftmenu.php. Now, in /bots/index.php I call: <?php include('../leftmenu.php')?> But, whenever I open my bots/index.php, all the images are the text alts, how do I fix this? * xFighter Image xFighter Star * xSlayer Image xSlayer Link to comment https://forums.phpfreaks.com/topic/173354-include-image-directory-question/ Share on other sites More sharing options...
kratsg Posted September 7, 2009 Share Posted September 7, 2009 This is an html question. You will want to use the absolute URL for your images in this case... instead of src="./SOMETHING_ELSE_HERE", make it src="http://www.yoursite.com/SOMETHING_ELSE_HERE" Link to comment https://forums.phpfreaks.com/topic/173354-include-image-directory-question/#findComment-913789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.