Link to home
Start Free TrialLog in
Avatar of Daniish
DaniishFlag for United Kingdom of Great Britain and Northern Ireland

asked on

What's wrong with my PHP include?

Hello,

At present to get images displaying on my site (www.globexposure.net/index.php) - i need to hardcode their markup in the MySQL database where i hold associated text. You can see this by clicking on the 'Norwich' (SE England) marker [pushpin > arrow > home icon].
The marked-up images are placed in a hidden <div> as follows:

<div class="hidden-container">
<a href="/travel_pics/72/Jess and Kate as Devils.jpg" class="highslide" onclick="return hs.expand(this, { thumbnailId: 'thumb1' })"></a><a href="/travel_pics/72/Peena and Elaine.JPG" class="highslide" onclick="return hs.expand(this, { thumbnailId: 'thumb1' })"></a>
</div>

Because i intend to have many pictures i have written a little PHP script to automate this markup, however, it's not working properly. You can see this by clicking on the airplane icon, also in 'Norwich'.
The marked-up images are placed in a hidden <div> as follows:

<div class="hidden-container">
<?php include ('./includes/travel_pic_thumbnails.php'); ?>
</div>

I have attached the PHP include FYI.
I have already asked this question, but the Expert is not responding (hope its OK to ask again):
https://www.experts-exchange.com/questions/23812047/PHP-include-not-working-properly-is-it-a-problem-with-the-PHP-website-structure-or-both.html


Many thanks for your help



travel-pic-thumbnails.php.txt
Avatar of TheAnarchist
TheAnarchist

What happens? Do you get any error messages? Does the include simply not show up?
if you use the index.php to deliver the literal content of the DIV, as you showed above, does it work?  And if so, is it just the include file that is not working?  If so, check that PHP includes are turned on for the web hosting company that is hosting your site, they are not always turned on by default.
Avatar of Daniish

ASKER

OK sorry for the delay...i have contacted my web hosting company and they have confirmed that PHP includes are turned on - so this is not the problem!

As for 'What happens?' - the airport marker only displays the 1/1 image. If you click on it you aren't given the option to browse Previous/Next - as you are when you click on the home icon, which utiliises images from the same folder (1/3 images)...

So what do you think?
That IS bizzare...

If you're pulling images from the same folder, the only thing I could think of would be that pointer (the thing that designates where you are up to when cycling through the files) is at the end of that directory and is not resetting.

Using this code, are you able to pull images from two different folders? That is, one of those bubbles has pictures from Folder A, and the other bubble has pictures from Folder B?

It has to be an issue with the pointer, I can't think of anything else it might be...
Everything you describe is working in FF2 and mozilla file.  Is this just an IE bug?  If so, it is only one of thousands.  Remember that google maps doesn't always work right with PHP, google has a whole set of built-in assumptions as to who will be running their maps, and how and from what platform.  The expanindg balloon for the airport works fine.
Avatar of Daniish

ASKER

Scrathcyboy - there seems to be some confusion - i'm only trying to get this to work in FF2 (its a personal website that i'm not intending/wanting anyone else to view - so no need for IE stability at this time)!

> Everything you describe is working in FF2

No it's not. The airplane marker has a photo and when you click on it, it says it's a 1/1 image - which means that the PHP include isn't picking up the rest of the images from the respective folder.


TheAnarchist - what can i do to confirm that it's an issue with the pointer?

Can either of you suggest a possible workaround....e.g. could the PHP include be written in Javascript (would this offer better stability)?

ASKER CERTIFIED SOLUTION
Avatar of Daniish
Daniish
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial