images php coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 16
Joined: Sun May 23, 2004 10:00 am
Location: Kay Ell


Postby cinoz » Thu Sep 09, 2004 4:57 pm

what is the flash parameters need to be ad on in my php coding.. coz b4 this, i just put the .gof image.. when i change it to .swf.. it doesn't work..
can i know the paramaters.. an example would help~ thanx~

User avatar
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby swirlee » Thu Sep 09, 2004 6:00 pm

Are you just trying to put the path/filename to the Flash file in the SRC of your IMG tag? 'Cause that's not gonna work. 'Cause a Flash file isn't an image. You have to use the object tag. As per usual, Google has the answer:

User avatar
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden

Postby gesf » Thu Sep 09, 2004 10:52 pm

Yeh swirlee is right!
Here is a lil' idea cinoz. You can try it, but i'm not sure if that regex is right :D

Code: Select all


$img = 'mypic.swf';

if ( preg_match ('/^.swf/i', $img) ) {

    echo "<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=",0,29,0">
    <param name="movie" value="' . $img . '">
    <param name="quality" value="high">
    <param name="menu" value="false">
    <embed src="' . $img . '" quality="high" pluginspage="" type="application/x-shockwave-flash"></embed>';                         
else {
    echo '<img src="' . $img . '">';      


Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest