Solved

What's wrong with my PHP include?

Posted on 2008-10-14
7
302 Views
Last Modified: 2011-10-19
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):
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_23812047.html


Many thanks for your help



travel-pic-thumbnails.php.txt
0
Comment
Question by:Daniish
  • 3
  • 2
  • 2
7 Comments
 
LVL 6

Expert Comment

by:TheAnarchist
ID: 22717664
What happens? Do you get any error messages? Does the include simply not show up?
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22717823
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.
0
 

Author Comment

by:Daniish
ID: 22732585
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?
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 6

Expert Comment

by:TheAnarchist
ID: 22736706
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...
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22736747
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.
0
 

Author Comment

by:Daniish
ID: 22738662
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)?

0
 

Accepted Solution

by:
Daniish earned 0 total points
ID: 22754250
Thank you all for help.

In the end, Ray Paseur helped me to identify the actual issue:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_23823234.html
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to count occurrences of each item in an array.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now