Posted by Tobi Hammert on 01/25/07 01:22
i just want to show up a random pic.
<?
$files = glob("./gfx/zufall/*");
shuffle ($files);
if (count($files) < 1)
$count = count($files);
else
$count = 1;
for ($i = 0; $i < $count; $i ++)
{
$file = $files[$i];
echo "<a href='index.php'><img src='$file' height='341'
width='634' border='0'></a>";
}
?>
it works fine, just ocasionally, it shows NO pic.
whats wrong? that is, how can i solve it?
Navigation:
[Reply to this message]
|