I函数增加参数

This commit is contained in:
oldrind
2016-01-21 15:20:07 +08:00
parent ed07585560
commit fc03a55ac3

View File

@@ -30,7 +30,7 @@ function C($name = '', $value = null, $range = '')
}
// 获取输入数据 支持默认值和过滤
function I($key, $default = null, $filter = '')
function I($key, $default = null, $filter = '', $merge = false, $data = [])
{
if ($pos = strpos($key, '.')) {
// 指定参数来源
@@ -44,7 +44,7 @@ function I($key, $default = null, $filter = '')
// 默认为自动判断
$method = 'param';
}
return \think\Input::$method($key, $default, $filter);
return \think\Input::$method($key, $default, $filter, $merge, $data);
}
/**