PDA

View Full Version : php include image shows on some of my pages not all need help please



gabainc
06-26-2007, 08:00 PM
Hi all.. i seem to have a glitch and i dont knwo how to fix it.. I learnt how to add single menu php code from navaldesigns thread.. and it works fine..

well i made one with an image and menu and it seem to be working.. on the some pages the image and menu will show and on others only the menu will show.. the image will have an X on it...

i dont understand why it is not working on al the page as i used the same include php code on al the pages.. if anyone cna help it willbe greatly appreciated...

here are the links it does not work on..

http://www.secretenhancers.com/Penis-Enlargement-Extenders-History.php/
http://www.secretenhancers.com/Penis-Enlargement-Extenders-Pumps.php/
http://www.secretenhancers.com/Penis-Enlargement-Extenders-Peyronies.php/
http://www.secretenhancers.com/Penis-Enlargement-Extenders-Surgery.php/

here is the code i have in the html box on the php pages
<?php
include ("menu.php");
menu();
?>

and on the menu page start

<? function menu() { ?>

End of page
<?
}
?>
so it works on some of my pages and not others..
any advice and help will be appreciated...


thansk Aaron

Watdaflip
06-26-2007, 08:13 PM
EDIT: Should have checked the page, the header image showed up after taking the "/" off the end of the link


By chance are you including it on some pages that are in a directory under your public_html (ex. www.yoursite.com/somefolder/page.html)? (http://www.yoursite.com/somefolder/page.html%29?)

If that is the case the reason is that the link is relative, (ex image.jpg), and needs to be absolute to work anywhere on your site (ex. http://www.yoursite.com/image.jpg).

If this is the case that the pages where the image doesn't work is because they are in a different folder, then you just need to either open the included file and change all the links to be absolute, or upload the images to that folder so they will be where the included file is looking for them

gabainc
06-26-2007, 10:23 PM
hi can you please be a little more detailed for me as i'm new to php..

EDIT: Should have checked the page, the header image showed up after taking the "/" off the end of the link

i published my pages using BV. i thought BV uploads all the necessary pictures of each .bvp file.

hi all my pages where published to this directorynad they are all .php

public_html/sesc


i still dont understand why they are not working.. Any help will be appreciated..
Thanks in Advnace aaron

larazovich
06-26-2007, 10:38 PM
another possibility is this:
If you have also published the same pages, ie same name, as html,maybe by accident or previously, whatever, then your include will maybe not work.
If that is the case you will have to delete the html version..
Happened to me..

navaldesign
06-26-2007, 10:47 PM
You have created folders named excactly as the pages, and published the pages there . If you take off the /, as watdaflip suggested, you will be ok. The image, in that case, appears in all 4 pages.

gabainc
06-26-2007, 11:18 PM
hi i know it sounds easily to fix.. but i dont quite understand how.. i looked inthe ftp inthat folder and i dont have any folders named the same as my .php pages...
also allmy pages on the secretenhancers.com are using the exact same menu.php include on everypage..

i'm sorry i'm new to this is there anyway you can wlak me through it inmore detail..
Thanks Aaron

gabainc
06-26-2007, 11:38 PM
ok

gabainc
06-26-2007, 11:52 PM
hi thansk for the help i finally understand what you were sayihng.. it was in the menu links in the html box that needed to be changed..

I have another favor to ask

Is it possibnel to mak ethe home sub menu clickable and not change to the color purpel as it is not user firendly..

can you please look at the code i edited to see if we cna make i more userfriendly professional..

Thanks Aaron

<!-- Keep all menus within masterdiv-->
<div id="masterdiv">
<div class="menutitle" onclick="SwitchMenu('sub0')"><a href="<A href="http://www.secretenhancers.com">HOME</a></div">http://www.secretenhancers.com">HOME</a></div>
<span class="submenu" id="sub0">
</span>
<div class="menutitle" onclick="SwitchMenu('sub1')">Penis Extenders</div>
<span class="submenu" id="sub1">
- <a href="<A href="http://www.secretenhancers.com/Penis-Enlargement-Extenders.php">SE">http://www.secretenhancers.com/Penis-Enlargement-Extenders.php">SE Approved Products</a><br>
- <a href="<A href="http://www.secretenhancers.com/Penis-Enlargement-Extenders-Work.php">How">http://www.secretenhancers.com/Penis-Enlargement-Extenders-Work.php">How They Work</a><br>
- <a href="<A href="http://www.secretenhancers.com/Penis-Enlargement-Extenders-Facts.php">Extender">http://www.secretenhancers.com/Penis-Enlargement-Extenders-Facts.php">Extender Facts</a><br>
- <a href="<A href="http://www.secretenhancers.com/Penis-Enlargement-Extenders-Size.php">Penis">http://www.secretenhancers.com/Penis-Enlargement-Extenders-Size.php">Penis Size</a><br>
- <a href="<A href="http://www.secretenhancers.com/Penis-Enlargement-Extenders-History.php">Extender">http://www.secretenhancers.com/Penis-Enlargement-Extenders-History.php">Extender History</a><br>
- <a href="<A href="http://www.secretenhancers.com/Penis-Enlargement-Extenders-Pumps.php">Extenders">http://www.secretenhancers.com/Penis-Enlargement-Extenders-Pumps.php">Extenders vs Pumps</a><br>
- <a href="<A href="http://www.secretenhancers.com/Penis-Enlargement-Extenders-Peyronies.php">Peroynies">http://www.secretenhancers.com/Penis-Enlargement-Extenders-Peyronies.php">Peroynies *******</a><br>
- <a href="<A href="http://www.secretenhancers.com/Penis-Enlargement-Extenders-Surgery.php">Penis">http://www.secretenhancers.com/Penis-Enlargement-Extenders-Surgery.php">Penis Enlargement Surgery</a>
</span>

Bethers
06-29-2007, 03:02 AM
Nothing in the code you posted is causing the color purple - that is set in the page properties - and you can change the link colors to anything there you want.