Solved

What's wrong with my PHP include?

Posted on 2008-10-14
7
303 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

911 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