Random Picture Display
Posted 03 October 2006 - 01:30 AM
I checked out this page for information on how to do it, but I'm not getting any images displayed.
Looking for some help here. Website is www.SWMORacing.com and the folder with the images is going to be www.swmoracing.com/forums/Banners
Posted 03 October 2006 - 02:28 AM
Posted 03 October 2006 - 04:24 AM
$file_dir="pics/a10";could be a problem. you could add
if(!is_dir($file_dir)) echo "not a directory";behind that line to make sure your variable validates as a directory.
$extension=substr($file,-6);assumes the provided extension is six characters long. so if you're just putting ".jpg" as the extension, it probably wouldn't work. Try this instead:
the PHP manuel reports that the read_dir method used in the tutorial is not correct. Their recommendation would look like this:
while (false !== ($file = readdir($dir)))
If those don't fix it, some specific error messages PHP is providing would certainly help narrow things down.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users