mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
I函数去掉data方法
This commit is contained in:
@@ -30,7 +30,7 @@ function C($name = '', $value = null, $range = '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取输入数据 支持默认值和过滤
|
// 获取输入数据 支持默认值和过滤
|
||||||
function I($key, $default = null, $filter = '', $merge = false, $data = [])
|
function I($key, $default = null, $filter = '', $merge = false)
|
||||||
{
|
{
|
||||||
if (0 === strpos($key, '?')) {
|
if (0 === strpos($key, '?')) {
|
||||||
$key = substr($key, 1);
|
$key = substr($key, 1);
|
||||||
@@ -41,7 +41,7 @@ function I($key, $default = null, $filter = '', $merge = false, $data = [])
|
|||||||
if ($pos = strpos($key, '.')) {
|
if ($pos = strpos($key, '.')) {
|
||||||
// 指定参数来源
|
// 指定参数来源
|
||||||
$method = substr($key, 0, $pos);
|
$method = substr($key, 0, $pos);
|
||||||
if (in_array($method, ['get', 'post', 'put', 'param', 'request', 'session', 'cookie', 'server', 'globals', 'env', 'path', 'file', 'data'])) {
|
if (in_array($method, ['get', 'post', 'put', 'param', 'request', 'session', 'cookie', 'server', 'globals', 'env', 'path', 'file'])) {
|
||||||
$key = substr($key, $pos + 1);
|
$key = substr($key, $pos + 1);
|
||||||
} else {
|
} else {
|
||||||
$method = 'param';
|
$method = 'param';
|
||||||
@@ -50,7 +50,7 @@ function I($key, $default = null, $filter = '', $merge = false, $data = [])
|
|||||||
// 默认为自动判断
|
// 默认为自动判断
|
||||||
$method = 'param';
|
$method = 'param';
|
||||||
}
|
}
|
||||||
return \think\Input::$method($has . $key, $default, $filter, $merge, $data);
|
return \think\Input::$method($has . $key, $default, $filter, $merge);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class Oracle extends Driver
|
|||||||
}
|
}
|
||||||
return $this->numRows;
|
return $this->numRows;
|
||||||
} catch (\PDOException $e) {
|
} catch (\PDOException $e) {
|
||||||
throw new \Exception($this->getError());
|
throw new \think\Exception($this->getError());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user