PHP MIME Types Array

Avatar of Felix Nagel Felix Nagel - 07. Mai 2008 - Webentwicklung

Hier findet ihr ein kleines php Array mit einigen MIME-Types . Diese werden zumBeispiel zur korrekten Auslieferung eines Downloads benötigt. Bei dieserZusammenstellung ist speziell auch auf MAC-Formate und Dateiformate aus demPrint Bereich (Freehand, Quark) wertgelegt worden.

 

<?php
// Definition der MIME Types
$types = array (
'avi' =>"video/x-msvideo",
'ai' =>"application/postscript",
'bmp' =>"image/bmp",
'c' =>"text/plain",
'c++' =>"text/plain",
'class' =>"application/java",
'css' =>"text/css",
'csv' =>"text/comma-separated-values",
'cdr' =>"application/cdr",
'doc' =>"application/msword",
'dot' =>"application/msword",
'docx' =>"application/msword",
'eps' =>"application/postscript",
'exe' =>"application/octet-stream",
'gif' =>"image/gif",
'gz' =>"application/gzip",
'gtar' =>"application/x-gtar",
'flv' =>"video/x-flv",
'fh4' =>"image/x-freehand",
'fh5' =>"image/x-freehand",
'fhc' =>"image/x-freehand",
'help' =>"application/x-helpfile",
'hlp' =>"application/x-helpfile",
'html' =>"text/html",
'htm' =>"text/html",
'ico' =>"image/x-icon",
'imap' =>"application/x-httpd-imap",
'inf' =>"application/inf",
'jpeg' =>"image/jpeg",
'jpg' =>"image/jpeg",
'js' =>"application/x-javascript",
'java' =>"text/x-java-source",
'log' =>"text/plain",
'm3u' =>"audio/x-mpequrl",
'midi' =>"audio/midi",
'mid' =>"audio/midi",
'mov' =>"video/quicktime",
'mp3' =>"audio/mpeg",
'mpeg' =>"video/mpeg",
'mpg' =>"video/mpeg",
'ogg' =>"application/ogg",
'pdf' =>"application/pdf",
'pgp' =>"application/pgp",
'png' =>"image/png",
'pps' =>"application/mspowerpoint",
'ppt' =>"application/mspowerpoint",
'ppz' =>"application/mspowerpoint",
'pot' =>"application/mspowerpoint",
'ps' =>"application/postscript",
'qt' =>"video/quicktime",
'qxd' =>"application/x-quark-express",
'rar' =>"application/x-rar-compressed",
'ra' =>"audio/x-realaudio",
'ram' =>"audio/x-pn-realaudio",
'rm' =>"audio/x-pn-realaudio",
'rtf' =>"text/rtf",
'swf' =>"application/x-shockwave-flash",
'svg' =>"text/xml-svg",
'tiff' =>"image/tiff",
'tif' =>"image/tiff",
'tgz' =>"application/x-compressed",
'txt' =>"text/plain",
'vob' =>"video/x-mpg",
'wav' =>"audio/x-wav",
'xls' =>"application/vnd.ms-excel",
'xlc' =>"application/vnd.ms-excel",
'xml' =>"text/xml",
'zip' =>"application/zip"
);
 ?>

Die Kommentarfunktion ist für diesen Artikel deaktiviert.

0 Kommentare