wierd photogallery bug

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
invisibled
Forum Contributor
Posts: 112
Joined: Sun Apr 29, 2007 3:35 pm
Location: New Westminster

wierd photogallery bug

Post by invisibled »

Ok so i built this photogallery. A php script reads all of the images in a folder and prints it into an array. and that array is stored in a variable. Then i call that script into my flash script and it prints eeverything out.

There is no thumbnails for the gallery, it just displays the images at a smaller size but if you load the gallery in IE it takes the small images and displays them as there full size, thus making everything look horrible and gross lol.

view http://www.raquelriskin.com in IE (seems to happen in 6 & 7 ) and then to "gallery" to see the bug. If you dont see it right away clear your cache and try it again.

Once an image has been loaded one time, it will then display normally so i think its a cache'ing issue, so is there a way i could cache all the images first then run the array. In theory it makes sence right?

let me know your guys thoughts, im really out of idea's for this one so anything will help. Cept i dont want to have to make two sets of images (thumbnails and full sized).

anything will help :)

almost forgot. here is my php file for the script.

Code: Select all

<?php
$path = substr($_SERVER["SCRIPT_FILENAME"], 0, strrpos($_SERVER["SCRIPT_FILENAME"],'/')+1);

$pixdir = dir($path . "../_images/_sized/");

$filelist = "";

while(($file = $pixdir->read()) !== false) {
	if (!($file == '.' || $file == '..' || $file == '.DS_Store' || $file == 'Thumbs.db' || $file == '_notes')) {
		$filelist .= "$file|";
	}
}
$pixdir->close();

echo "&filelist=" . $filelist;
?>
invisibled
Forum Contributor
Posts: 112
Joined: Sun Apr 29, 2007 3:35 pm
Location: New Westminster

please!

Post by invisibled »

i literally mean any suggestions will help :)
Post Reply