Rev 4 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 5 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | */ |
20 | */ |
21 | 21 | ||
22 | class VtsFileTypeDetect { |
22 | class VtsFileTypeDetect { |
23 | 23 | ||
24 | public static function getMimeType($filename) { |
24 | public static function getMimeType($filename) { |
- | 25 | $mime_types = array(); |
|
- | 26 | ||
25 | include __DIR__ . '/mimetype_lookup.inc.php'; |
27 | include __DIR__ . '/mimetype_lookup.inc.php'; |
26 | 28 | ||
27 | foreach ($mime_types as $ext => $mime) { |
29 | foreach ($mime_types as $ext => $mime) { |
28 | if (strtoupper(substr($filename, -strlen($ext)-1)) == strtoupper('.'.$ext)) { |
30 | if (strtoupper(substr($filename, -strlen($ext)-1)) == strtoupper('.'.$ext)) { |
29 | return $mime; |
31 | return $mime; |