title: Header location not working properly
body: <p>I have a php script that renders an image (with imagick) and saves it to some directory <code>"SITE_ROOT.$filePath"</code>, then does a <code>header('Location: ' . SITE_ROOT.$filePath)</code>, the file it redirects to is a png image. </p>
  
  <p>If I go to the path directly, like just type it in the URL bar I can save the image and everything works fine, however when I rely on the script to redirect me and I try to right click and save the image it doesn't recognise that I'm actually trying to save an image, it thinks I'm trying to save it as a non-typed file called 'Driver' which is the name of the script page.</p>
  
  <p>I have no idea what's wrong here, surely the header location should just take me to the image and have no record of the 'Driver' file after it has redirected?</p>
  
  <p>The same thing happens with <code>redirect()</code> too btw.</p>
  
  <p>Thanks in advance for any help!</p>
  
  <p><strong>Edit:</strong> This problem was solved by placing a <code>die()</code> after the header command.</p>