title: PHP readfile() not working
body: <p>I can't get readfile() to work. Trying to display an image. I have this in a page caled 'getImage.php'</p>
  
  <pre><code>&lt;?php 
  header('Content-Type: image/jpg');
  readfile($_SERVER['DOCUMENT_ROOT']."/images/test.jpg");
  ?&gt;
  </code></pre>
  
  <p>I've tried using a relative path of just 
      readfile("images/test.jpg");</p>
  
  <p>I still get a broken image, When viewing the source code the image source shows:<br>
      site.co.uk/getImage.php</p>
  
  <p>When I remove the header I get page full of weird symbols and letters.  </p>
  
  <p>What am I doing wrong? Could this be a config in the php.ini file? Am on shared hosting, so not sure I can amend it. Have also tried file_get_contents() but still can't display image. </p>
  
  <p>Image size is 242 KB.</p>
  
  <p>Thanks</p>