It was working fine on the test server. loaded it onto iis6 server after
installing php and got everything working (after redirecting it to the
correct directory) except for 1 annoying error that I don't understand.
Any help would be appreciated - the sooner the better so I can get some
sleep tonight!
Undying gratitude to anyone willing to help a php beginner!
here's the page with the error http://www.ioworldwide.com/ and...
php code follows:
*<?php
$dir=opendir("/ioworldwide/rotator/");
//This is the directory route to the folder
$directory="rotator/";
//This is a relative link to the directory if it is not in the same
directory as the file you are displaying the images on
$pattern="\.(gif|jpg|jpeg|png|bmp|swf)$";
if(!$dir)
{
die("Failed to read directory");
}
$s=readdir($dir);
$count="0";
$image;
while($s)
{
if(ereg($pattern, $s))
{
$image[$count]=$s;
$count++;
}
$s=readdir($dir);
}
closedir($dir);
//Spit it out
$limit=count($image);
$limit--;
$randNum=rand(0,$limit);
$size=getimagesize("$directory$image[$randNum]");
$notSWF = "\.(gif|jpg|jpeg|png|bmp)$";
if( ereg( $notSWF , "$directory$image[$randNum]" ) )
echo "<br><img src=\"$directory$image[$randNum]\" $size[3]>";
else
echo "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.c
ab#version=6,0,0,0\" WIDTH=\"589\"
HEIGHT=\"165\" id=\"image_one\" ALIGN=\"\">
<PARAM NAME=movie VALUE=\"$directory$image[$randNum]\">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<param name=loop value=false>
<EMBED src=\"$directory$image[$randNum]\" quality=high bgcolor=#FFFFFF
WIDTH=\"589\" HEIGHT=\"165\"
NAME=\"$directory$image[$randNum]\" ALIGN=\"\"
TYPE=\"application/x-shockwave-flash\"
PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\">
</EMBED>
</OBJECT>";
?>