Continued a bit:
- added spaces/curly braces - used x($foo, 'bar') instead of isset($foo['bar']) - let's wrap html_entity_encode() somehow Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
ddd875bba0
commit
28c08467fd
2 changed files with 35 additions and 28 deletions
|
|
@ -1060,13 +1060,14 @@ function z_mime_content_type($filename) {
|
|||
'zsh' => 'text/x-script.zsh',
|
||||
);
|
||||
|
||||
$dot = strpos($filename,'.');
|
||||
$dot = strpos($filename, '.');
|
||||
if ($dot !== false) {
|
||||
$ext = strtolower(substr($filename,$dot+1));
|
||||
$ext = strtolower(substr($filename, $dot + 1));
|
||||
if (array_key_exists($ext, $mime_types)) {
|
||||
return $mime_types[$ext];
|
||||
}
|
||||
}
|
||||
/// @TODO Then let's get rid of it?
|
||||
// can't use this because we're just passing a name, e.g. not a file that can be opened
|
||||
// elseif (function_exists('finfo_open')) {
|
||||
// $finfo = @finfo_open(FILEINFO_MIME);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue