コード例 #1
0
ファイル: functions.php プロジェクト: phpf/http
 /**
  * Returns Internet Media Type (MIME) for given filetype.
  *
  * @param string $filetype	Filetype (e.g. 'js', 'xls', 'ogg').
  * @param string $default	Value to return if mime not found.
  * @return string			MIME, if found, otherwise default.
  */
 function mimetype($extension, $default = 'application/octet-stream')
 {
     return Util::getMimetype(strtolower(ltrim($filetype, '.')), $default);
 }