title: How to call an swf file using php?
body: <p>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:  </p>
  
  <pre><code>&lt;?php echo getcwd(); ?&gt;  
  &lt;object width="550" height="400"&gt;  
  &lt;param name="movie" value="somefilename.swf"&gt;  
  &lt;embed src="/message/get-file/messageId/&lt;?php echo $this-&gt;message-&gt;id; ?&gt;" width="550" height="400"&gt;  
  &lt;/embed&gt;  
  &lt;/object&gt;
  </code></pre>
  
  <p>The <code>readfile($fileName);</code> code opens a save file box that successfully saves the file and is larger than 1KB.
  I feel like I'm missing something basic?</p>
  
  <p>Just to confirm, I can with images but not flash? Is this right?  </p>
  
  <pre><code>`header("Content-Type: image/jpg");  
  header("Content-Disposition: attachment; filename=$fileName");  
  readfile($fileName);`  
  </code></pre>
  
  <p>I then used :<br>
      <code>&lt;img src='/message/get-file/messageId/&lt;?php echo $this-&gt;message-&gt;id; ?&gt;'</code>  </p>
  
  <p>This worked fine  </p>
  
  <p>I was hopping to do something like<br>
      <code>header("Content-Type: application/x-shockwave-flash",true);<br>
      header("Content-Disposition: attachment; filename=$fileName");
      readfile($fileName);</code></p>
  
  <p>And then<br>
      <code>&lt;embed src="/message/get-file/messageId/&lt;?php echo $this-&gt;message-&gt;id; ?&gt;"</code></p>