Show image or flash file

A

Anonymous

Guest
after upload a file, if it is a image, it can show , but if it is a flasf file, it won't show up, what is the problem, the code is here:

if ($qry['Type']=="application/x-shockwave-flash")
{
echo "<object classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0 width=640 height=400>";
echo "<param name=src value='$filename>'";
echo "<embed src='$filename' pluginspage=http://www.macromedia.com/shockwave/download/ width=640 height=400></embed>";
echo "</object>";
}
elseif ($qry['Type']=="image/pjpeg")
{
$size = getImageSize($filename);
$width = $size[0];
$height = $size[1];

echo "<TR>";
echo "<TD ALIGN=CENTER>";
echo "<div align=left><IMG SRC='$filename'";
echo "WIDTH='$width' HEIGHT='$height'>";
echo "</div></TD>";
echo "</TR>";
}
 
Debugging isn't that hard. First you have to figure out what the problem is. Then you have to fix it.

So, firstly, are you getting any errors? Barring that, we'll move on..

Secondly, is any of the HTML showing up for the Flash part of the code? If not, then we know the problem: Your condition is failing when it shouldn't.

If the HTML is showing (when you View Source, that is) but the movie isn't, then examine the HTML and make sure that it looks like you expect.
 
Back
Top