root/devel-backup/units/files/files_mimetype_inline.php

Revision 45, 481 bytes (checked in by sven, 3 years ago)

dos2unix to clean line endings, set svn property eol-style native, some whitespace homogenisation

  • Property svn:eol-style set to native
Line 
1 <?php
2
3     // Determines whether or not a file should be displayed inline (false if not, the mime-type if true)
4     // $parameter = the file location
5     
6     /*    $mimetype = mime_content_type($parameter);
7         
8         if (in_array($mimetype,$data['mimetype:inline'])) {
9             $run_result = $mimetype;
10         } else {
11             $run_result = false;
12         } */
13         $result = @getimagesize($parameter);
14         if ($result != false) {
15             $run_result = image_type_to_mime_type($result[2]);
16         } else {
17             $run_result = false;
18         }
19
20 ?>
Note: See TracBrowser for help on using the browser.