title: Generate a Doc File with an Image
body: <pre><code>&lt;?php
  
  
  
      $docName = "testdoc";
  
  
      header("Expires: Mon, 26 Jul 2020 05:00:00 GMT"); 
      header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
      header("Cache-Control: no-store, no-cache, must-revalidate");
      header("Cache-Control: post-check=0, pre-check=0", false);
      header("Pragma: no-cache"); 
  
      header("Content-Type: application/msword; charset=ISO-8859-1");
      header("Content-Disposition: attachment; filename=\"".$docName.".doc"); 
  
      #/ Create and format your text using HTML, its simple stuff ... trial and error ;)
      echo '&lt;img src="logo.gif" /&gt;';
  
  ?&gt;
  
  Soumya Sarkar
  </code></pre>
  
  <p>Hi I got this following code from google to generate a Doc file by php. But I am unable to put any image there. Can anybody help me with it?</p>