Skip to content

Instantly share code, notes, and snippets.

View fengliang2011's full-sized avatar

Feng Liang fengliang2011

  • Wuhan, Hubei Province
View GitHub Profile
@fengliang2011
fengliang2011 / file_extension_to_mimetype.php
Last active January 24, 2019 10:30
MIME Types by file extension in a PHP array
$types = array(
'ai' => 'application/postscript',
'aif' => 'audio/x-aiff',
'aifc' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'asc' => 'text/plain',
'atom' => 'application/atom+xml',
'atom' => 'application/atom+xml',
'au' => 'audio/basic',
'avi' => 'video/x-msvideo',