After reading a few posts here I formulated this function which is sort of a mishmash of a bunch of others:
function outputFile( $filePath, $fileName, $mimeT
Not sure if this is the real answer, but I think you intended
header('Content-Type: ' . $mimeType);
to be
header('Content-Type: ' . $mimeTypes[$mimeType]);
Ok, I figured it out.
The script above DOES work.
What was happening is I had a series of include_once files, and one of them had a blank line causing the issue.