|
@ -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){ |
|
|