mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
增加I方法用于系统变量获取
This commit is contained in:
10
base.php
10
base.php
@@ -48,6 +48,16 @@ function C($name='',$range='') {
|
||||
return \Think\Config::get($name,$range);
|
||||
}
|
||||
|
||||
// 获取输入数据
|
||||
function I($key,$default,$filter) {
|
||||
if(strpos($key,'.')) { // 指定参数来源
|
||||
list($method,$key) = explode('.',$key);
|
||||
}else{ // 默认为自动判断
|
||||
$method = 'param';
|
||||
}
|
||||
return \Think\Input::$method($key,$filter,$default);
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录和统计时间(微秒)和内存使用情况
|
||||
* 使用方法:
|
||||
|
||||
Reference in New Issue
Block a user