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.
Printable View
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.
What went wrong with it?
Google helps immensly.PHP Code:
<?
$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);
?>
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/9...f12e36axy2.png
Firefox nearly crashed :P
Yer, nvm i used another simple PHP script. +rep to both of you.