I'm using this script to insert picture into database:
  $data = addslashes( fread( fopen( $arrayUploadedSomething['tmp_name'],
"r"), filesize($arrayUploadedSomething['tmp_name'] ) ) );

And then i use ordinary mysql_query to insert it into database (BLOB field).
When i print image on screen, I use this code:

 header("Content-type: " . $arraySomething['something_type']);
 header("Content-Disposition: inline; filename=" .
$arraySomething['something_name'] );
 print $arraySomething['something_data'];

And it works very well...:D

BUT, if i insert Flash animation (or something else made in Flash) it goes
into database well, but when I print it out .... :D
It wants to download (ignoring the contex-dispositon header) , and if i
click open or save, it show error ....

I know that I must use HTML like this:
----------------------------------------------------------------------
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=6,0,29,0" align="middle">
     <param name="movie" value="something/show.php?bid=<?php echo
$arraySomething['bid'];?>" />
     <param name="quality" value="high" />
     <embed src="something/show.php?bid=<?php echo
$arraySomething['bid'];?>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"; align="middle"
type="application/x-shockwave-flash"></embed>
  </object>
----------------------------------------------------------------------

It prints out Flash but the size is not correct, and it si blank (white)...
Anyone knows where the problem could be ?

Thanks

--
Regards,
Mitja



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to