I'm using the zend framework. From within my phtml file, I am trying to call a link to a swf file that is outside of my web directory. The code for this link is:
<?php echo getcwd(); ?>
<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="/message/get-file/messageId/<?php echo $this->message->id; ?>" width="550" height="400">
</embed>
</object>
The readfile($fileName);
code opens a save file box that successfully saves the file and is larger than 1KB.
I feel like I'm missing something basic?
Just to confirm, I can with images but not flash? Is this right?
`header("Content-Type: image/jpg");
header("Content-Disposition: attachment; filename=$fileName");
readfile($fileName);`
I then used :
<img src='/message/get-file/messageId/<?php echo $this->message->id; ?>'
This worked fine
I was hopping to do something like
header("Content-Type: application/x-shockwave-flash",true);
header("Content-Disposition: attachment; filename=$fileName");
readfile($fileName);
And then
<embed src="/message/get-file/messageId/<?php echo $this->message->id; ?>"