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.
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);
?>
Last edited by Florx; 19-12-2007 at 03:47 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!
Firefox nearly crashed![]()
Last edited by Jamesy; 19-12-2007 at 04:00 PM.
Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/
Want to hide these adverts? Register an account for free!