Changeset 885 for trunk/Modules/File
- Timestamp:
- Sep 8, 2020, 5:57:23 PM (4 years ago)
- Location:
- trunk/Modules/File
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/File/File.php
r876 r885 43 43 function DetectMimeType($FileName) 44 44 { 45 global $MimeTypes;46 47 $Result = $MimeTypes[ pathinfo($FileName, PATHINFO_EXTENSION)][0];45 $MimeTypes = GetMimeTypes(); 46 $MimeType = pathinfo($FileName, PATHINFO_EXTENSION); 47 $Result = $MimeTypes[$MimeType][0]; 48 48 return $Result; 49 49 } -
trunk/Modules/File/MimeTypes.php
r738 r885 1 1 <?php 2 2 3 $MimeTypes = array( 3 function GetMimeTypes() 4 { 5 return array( 4 6 '7z' => array('application/x-7z-compressed'), 5 7 'ai' => array('application/postscript'), … … 123 125 'xsl' => array('text/xml'), 124 126 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed') 125 ); 127 ); 128 }
Note:
See TracChangeset
for help on using the changeset viewer.