Browse Source

修改根据文件拓展名查找系统定义的文件类型方法

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
9b59a55cd1
  1. 8
      backend/logic/file/FileManager.php

8
backend/logic/file/FileManager.php

@ -25,11 +25,11 @@ class FileManager
/** /**
* @param $array * @param $array
* @param $value
* @return int
* 查看$extension数组中是否存在文件类型,不存在则返回-1
* @param $keyword
* @return bool|int|string
* 根据文件拓展名在$extension中查找对应的文件类型,若不存在则返回false
*/ */
public function searchType($array, $keyword, $key=-1){
public function searchType($array, $keyword){
foreach($array as $key => $value){ foreach($array as $key => $value){
foreach ($value as $k => $v) { foreach ($value as $k => $v) {
if($v == $keyword){ if($v == $keyword){

Loading…
Cancel
Save