title: Displaying images using PHP not working
body: <p>I'm trying to display an image using a PHP script. Basically so the php script is passed on the full path to the image, and it then displays that image in the browser. I've checked to make sure the image exists, it is being read correctly, etc, however in the browser i just see the broken image box (e.g the small red cross in IE) if I go there.</p>
  
  <p>My script sends out these headers:</p>
  
  <pre><code>&lt;?php
  header('Last-Modified: ' . gmdate('D, d M Y H:i:s T', filemtime($file)));
  header('Content-Type: '.$mime);
  header('Content-Length: '.filesize($file)."\n\n");
  header('Etag: '.md5($file));
  echo $file;
  die;
  </code></pre>
  
  <p><code>$file</code> contains something like <code>'/var/www/htdocs/images/file.jpg'</code> which works. the <code>$mime</code> is <code>'image/jpeg'</code>.</p>
  
  <p>I have also tried echoing <code>file_get_contents($file)</code> but it didn't work either.</p>
  
  <p>What is the problem, any thoughts?</p>