Hi, I am trying to include my menu and header on my website. It seems to be picking up the pictures but not showing them. My code is: <?php include ("..\head.html"); ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td valign="top" align="left" width="90"> <?php include ("..\menu.html"); ?> PHP: My file structure is like this: FILE menu.php FILE head.php FOLDER blog - FILE index.php(where the code came from) FOLDER Images The menu and head files all link to the images folder, it is showing me the name of the image but just a little red cross. I hope that explains it ok. I don't knwo if i'm just missing something simple. Can anyone help?
As you say your files are head.php and menu.php. So you have to include those files and not head.html and menu.html The two php lines should be the following include ("..\head.php"); include ("..\menu.php");
Sorry I didn't mean .php I meant .html mistake by me there. Any other reasons you can think of for it not showing the images?
Use slash and not backslash include ("../head.php"); include ("../menu.php"); If it does not work either, then use the real path of the files.
It's in a lower directory that why I put ..\ I tried ../ but that didn't work either. Any other ideas?
if you see that the files are called but images are not shown than check image paths on your head and menu files. put a slash to be sure your getting them from the root domain like : /images/image.jpg
I have used the head and menu files in other files in the same folder as them and they have worked fine which is why its confusing me? thomasdgr I have tried using the full path as well and it still didn't work. Thanks
This is my head.html code: <html> <body> <div id="wrapper"> <table height="80" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr><td align="centre" valign="bottom" width="160" rowspan="2"> <a href="1.homepage.php"> <img src="Images/newheading.gif" width="978" height="180" alt="Bassett Green"> </a></td> </tr></table> <div align="right"> <?php echo date("l F d, Y"); ?> </div> <div align="left"> <a href="http://home.healthyschools.gov.uk/"><img src="Images/healthy_schools.png" alt="Healthy Schools"></img></a> <a href="http://www.teachernet.gov.uk/teachingandlearning/subjects/pe/"><img src="Images/active_mark.png" alt="Active Mark"></img></a> <a href="http://www.investorsinpeople.co.uk/Pages/Home.aspx"><img src="Images/investor_in_people.png" alt="Investors In People"></img></a> <a href="http://www.nationalcollege.org.uk/"><img src="Images/ncsl.png" alt="NCSL"></img></a> <a href="http://www.artscouncil.org.uk/"><img src="Images/arts_council.png" alt="Arts Council England"></img></a> </div> </br> PHP: It's confusing me as the head.html and menu.html work fine with other files that are in the same folder as them. It's obviously picking them up just no the picture. Thanks for looking