sto provando questa 'alternativa' ma 1 dovrei aggiungere il 'link' all'immagine;
e c'e qualcosa che non va... vuoi dargli un occhiata?!
<?php
if (eregi("block-Immagine_Casuale.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}
$folder = 'images/blocks/BloccoDDS/;
$i = 0;
$in = opendir ($folder);
while ($x = readdir($in))
{ if ($x != '.' && $x != '..')
{$imaged[$i++] = $x;}
}
closedir ($in);
srand((double)microtime()*1000000);
$image = $folder.'/'.$imaged[rand(0,sizeof($imaged)-1)];
$content = "<div align=\"center\">";
$content .= " <table border="0" cellpadding="5" cellspacing="5">";
$content .= " <tr>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " </tr>";
$content .= " <tr>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " </tr>";
$content .= " <tr>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " <td><img src=\"$image\" border=\"0\"></td>";
$content .= " </tr>";
$content .= " </table>";
$content .= "</div>";
?>
che' c'e perche' non va?

Rispondi quotando