PDA

View Full Version : bolGallery



Verrou
19-12-2007, 09:16 AM
I dunno but i think something went wrong -.-

http://orangetrees.wsnw.net/users/badges.php

Anyone know a better way to list images in a directory or how to fix mine?
+REP to all help.

V.

Florx
19-12-2007, 03:44 PM
What went wrong with it?




<?
$dir = 'path_to_images_directory_from_this_script';

// open specified directory
$dirHandle = opendir($dir);
$count = -1;
$returnstr = "";
while ($file = readdir($dirHandle)) {
// if not a subdirectory and if filename contains the string '.gif'
if(!is_dir($file) && strpos($file, '.gif')>0) {
// update count and string of files to be returned
$count++;
$returnstr .= "<img src=\"$file\" />";
}
}
$returnstr .= '&';
echo $returnstr;
closedir($dirHandle);
?>



Google helps immensly.

Jamesy
19-12-2007, 03:58 PM
Now that would be awesome to do that javascript that makes images fly around on that page, I'll go do it and take a screenshot!

http://img523.imageshack.us/img523/9466/scr1f12e36axy2.png
Firefox nearly crashed :P

Verrou
19-12-2007, 09:15 PM
Yer, nvm i used another simple PHP script. +rep to both of you.

Want to hide these adverts? Register an account for free!