Solved

What's wrong with my PHP include?

Posted on 2008-10-14
7
314 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

623 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