Browse Source

处理循环数组函数的方法名错误问题

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
15b00087d5
  1. 4
      backend/logic/file/FileManager.php

4
backend/logic/file/FileManager.php

@ -22,7 +22,7 @@ class FileManager
* @return int
* 查看$extension数组中是否存在文件类型,不存在则返回-1
*/
public function searchKey($array,$value, $key=-1){
public function searchType($array,$value, $key=-1){
foreach($array as $k=>$row){
if(!is_array($row)){
if($row == $value){
@ -33,7 +33,7 @@ class FileManager
}
}
}else{
$r = self::searchKey($row,$value, $k);
$r = self::searchType($row,$value, $k);
if($r != -1){
return $r;
}

Loading…
Cancel
Save