title: How to output a file from CodeIgniter without forcing download?
body: <p>There seem to be lots of solutions out there for CodeIgniter to force download of a file, but I can't find any for outputting a file without forcing a download. </p>
  
  <p>In my case, I've redirected my file downloads through a controller (originally Apache handled them directly) in order to log statistics. I used the CodeIgniter force_download function in the download helper. However, I've now had a request that some or all files should be able to be opened in the browser, such that saving to a file isn't forced, so I'm wanting to know how to do it.</p>
  
  <p>Presumably, it's mostly a matter of outputting the right header, though I don't know whether different headers will be required for different file types. Has anyone got an example?</p>