File/mime-types.php

Description
Constants
ALL_MIMES = IMAGE_MIMES.",".DOCUMENT_MIMES.",".AUDIO_MIMES.",".MOVIE_MIMES (line 152)
AUDIO_MIMES = CONTENT_AUDIO.",".CONTENT_MP3.",".CONTENT_AIFF.",".CONTENT_WAV.",".CONTENT_RA.",".CONTENT_OGG (line 135)
CONTENT_AIFF = "audio/x-aiff" (line 90)

AIFF sound files

CONTENT_ASF = "video/x-ms-asf" (line 104)

Media player ASF, ASX Movies

CONTENT_AUDIO = "audio/basic" (line 86)

AU/SND basic audio files

CONTENT_AVI = "video/x-msvideo" (line 102)

AVI Movies

CONTENT_BMP = "image/bmp" (line 48)

BMP attachment

CONTENT_CSV = "text/csv" (line 36)

CSV attachments

CONTENT_FLASH = "application/x-shockwave-flash" (line 108)

Shockwave Flash movies

CONTENT_GIF = "image/gif" (line 44)

GIF attachment

CONTENT_HTML = "text/html" (line 32)

HTML attachments

CONTENT_JPEG = "image/jpeg" (line 40)

Jpeg image attachment

CONTENT_LATEX = "application/x-latex" (line 78)

Latex format

CONTENT_MP3 = "audio/mpeg" (line 88)

MP3 audio files

CONTENT_MPEG = "video/mpeg" (line 100)

MPEG Movies

CONTENT_MSACCESS = "application/msaccess" (line 66)

M$ Word docs

CONTENT_MSDOS = "application/x-msdos-program" (line 58)

EXE files, binaries of poor parentage

CONTENT_MSEXCEL = "application/vnd.ms-excel" (line 62)

M$ Excel spreadsheets

CONTENT_MSPROJECT = "application/vnd.ms-project" (line 64)

M$ Project files

CONTENT_MSWORD = "application/msword" (line 60)

M$ Word docs

CONTENT_OCTET = "application/octet-stream" (line 54)

Binaries of questionable parentage

CONTENT_OGG = "audio/x-ogg" (line 96)

OGG sound files

CONTENT_PDF = "application/pdf" (line 70)

Adobe PDF's

CONTENT_PHOTO = "image/pjpeg" (line 42)

Photo Jpeg image attachment

CONTENT_PNG = "image/png" (line 46)

PNG attachment

CONTENT_PSCRIPT = "application/postscript" (line 72)

Postscript format

CONTENT_QUICKTIME = "video/quicktime" (line 106)

Quicktime movies

CONTENT_RA = "audio/x-realaudio" (line 94)

REALAUDIO sound files

CONTENT_RTF = "application/rtf" (line 74)

Rich text format

CONTENT_TEX = "application/x-tex" (line 76)

Tex format

CONTENT_TEXT = "text/plain" (line 30)

TEXT

CONTENT_TIFF = "image/tiff" (line 50)

TIFF attachment

CONTENT_WAV = "audio/x-wav" (line 92)

WAV sound files

CONTENT_WINMEDIA = "application/x-mplayer2" (line 110)

Windows Media Player

CONTENT_XML = "text/xml" (line 34)

XML attachments

CONTENT_ZIP = "application/zip" (line 82)

ZIP archive

DOCUMENT_MIMES = CONTENT_TEXT.",".CONTENT_HTML.",".CONTENT_XML.",".CONTENT_TEX.",".CONTENT_LATEX.",".CONTENT_CSV.",".CONTENT_MSWORD.",".CONTENT_MSEXCEL.",".CONTENT_PDF.",".CONTENT_PSCRIPT.",".CONTENT_RTF (line 122)
FLASH_MIMES = CONTENT_FLASH (line 149)
IMAGE_MIMES = CONTENT_JPEG.",".CONTENT_PHOTO.",".CONTENT_GIF.",".CONTENT_PNG.",".CONTENT_BMP.",".CONTENT_TIFF (line 114)
MOVIE_MIMES = CONTENT_MPEG.",".CONTENT_AVI.",".CONTENT_ASF.",".CONTENT_QUICKTIME (line 143)
Functions
mimetype_category (line 230)

Returns the category associated with the given mimetype. This just allows you to ascertain what basic group of objects the mimetype belongs to, like 'image', 'document', 'movie', 'sound', etc.

  • return: The overall mime category name
string mimetype_category ([string $mimetype = ""])
  • string $mimetype: The mimetype to categorise.
mimetype_from_filename (line 250)

Returns the mimetype associated with the given filepath or false of no match was found..

  • return: The mimetype of the given file
string mimetype_from_filename ([mixed $path = ""], string $extn)
  • string $extn: The file extension, eg: '.gif' etc.

Documentation generated by phpDocumentor 1.3.0RC3