I'm ripping my hair out here, lol. Before, I was simply redirecting to the file to be downloaded via download.php?file=fileid. The guy I'm working with didn't like it that way, because people would have access to the path to the original file. So now we're going the route of using the header attachment, which I'm told I need the MIME type for. Every function I use to get it, though, it undefined. mime_content_type() is deprecated, and always come back as an undefined function. finfo_open() is also undefined. finfo_file() is the same thing. Any ideas? How can I get the MIME type?
That isn't going to work since I'm providing the file via a database call. $_FILE depends on the browser transmitting data (upload vs download).