When I just upload the ".php" file -- everything works JUST FINE. (ie... it pulls from the directory, and randomly generates the image).
However, when I take this SAME code:
<?php
Directory goes here relative to script
$kataloog = '/ad';
Directory should contain only images, else you can add some more filtering
$i = 0;
$kat = opendir ($kataloog);
while ($f = readdir($kat))
{ if ($f != '.' && $f != '..') # Directory should contain only images, else you can add some more filtering
{$nimed[$i++] = $f;}
}
closedir ($kat);
srand((double)microtime()*1000000);
$nimi = $kataloog.'/'.$nimed[rand(0,sizeof($nimed)-1)];
$suurus = GetImageSize ($nimi);
?>
<P><img src="<?php echo $nimi; ?>" <?php echo $suurus[3]; ?> align="left" alt="Advertisement"></p>
And I embed it into html (ie... I copy/paste the code into a table) -- the image will not be pulled from the above mentioned directory -- the .php file is in the same directory as the .htm file with the embeded code. I have played with the directory location, but nothing. 🙁
Guido