mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 07:32:48 +08:00
Input类增加env方法获取环境变量
This commit is contained in:
@@ -134,6 +134,18 @@ class Input {
|
|||||||
return self::getData($name,$GLOBALS,$filter,$default);
|
return self::getData($name,$GLOBALS,$filter,$default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取环境变量
|
||||||
|
* @access public
|
||||||
|
* @param string $name 数据名称
|
||||||
|
* @param string $default 默认值
|
||||||
|
* @param string $filter 过滤方法
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
static public function env($name='',$default=null,$filter='') {
|
||||||
|
return self::getData($name,$_ENV,$filter,$default);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取系统变量 支持过滤和默认值
|
* 获取系统变量 支持过滤和默认值
|
||||||
* @access public
|
* @access public
|
||||||
|
|||||||
Reference in New Issue
Block a user