How can I get the correct headers automatically given a filetype in PHP?
- by incrediman
A few times I've run into situations where I'd like to be able to include a file using PHP, and depending on the included filetype, output the appropriate headers. In the past I've just done this manually by switch/casing the extension type with the appropriate content-type headers.
However what I'm wondering now is if there's a function like
…