2 /* vim: set expandtab sw=4 ts=4 sts=4: */
7 * @todo Maybe we could try to use fileinfo module if loaded
11 * Tries to detect MIME type of content.
13 function PMA_detectMIME(&$test) {
15 if ($len >= 2 && $test[0] == chr(0xff) && $test[1] == chr(0xd8)) {
18 if ($len >= 3 && substr($test, 0, 3) == 'GIF') {
21 if ($len >= 4 && substr($test, 0, 4) == "\x89PNG") {
24 return 'application/octet-stream';