1、获取数组形式参数的方法

2、更新内核路由类
This commit is contained in:
2016-07-11 14:58:05 +08:00
parent 6460d64ceb
commit 50403e365a
10 changed files with 43 additions and 40 deletions

View File

@@ -148,4 +148,15 @@ class Base extends \think\Controller{
$this->assign('request',$this->request);
$this->assign('param',$this->param);
}
/**
* 获取单个参数的数组形式
*/
protected function getArrayParam($param){
if (isset($this->param['id'])) {
return array_unique((array)$this->param[$param]);
}else{
return array();
}
}
}