增加控制器

v6
Chaim 4 years ago
parent 8ec24e4186
commit 688b3dacca

@ -1,5 +0,0 @@
## v6.0.2 / 2020-04-13
- 测试
## v6.0.1 / 2020-04-13
- 测试

@ -20,7 +20,7 @@
],
"homepage": "https://www.dtapp.net",
"require": {
"php": ">=7.0",
"php": ">=7.1.0",
"topthink/framework": "^6.0.0",
"topthink/think-orm": "^2.0",
"liguangchun/ip": "^1.1"

@ -18,6 +18,7 @@ use DtApp\Ip\IpException;
use DtApp\Ip\QqWry;
if (!function_exists('get_ip_info')) {
/**
* 获取请求IP信息
* @param string $ip
@ -41,6 +42,7 @@ if (!function_exists('get_ip_info')) {
}
if (!function_exists('get_ip')) {
/**
* 获取请求IP
* @return string
@ -58,3 +60,51 @@ if (!function_exists('get_ip')) {
return $ip;
}
}
if (!function_exists('auth')) {
/**
* 访问权限检查
* @param string $node
* @return boolean
*/
function auth($node)
{
return $node;
}
}
if (!function_exists('sysconf')) {
/**
* 获取或配置系统参数
* @param string $name 参数名称
* @param string $value 参数内容
* @return mixed
*/
function sysconf($name = '', $value = null)
{
if (is_null($value) && is_string($name)) {
return cache($name);
} else {
return cache($name, $value);
}
}
}
if (!function_exists('sysdata')) {
/**
* JSON 数据读取与存储
* @param string $name 数据名称
* @param mixed $value 数据内容
* @return mixed
*/
function sysdata($name = '', $value = null)
{
if (is_null($value) && is_string($name)) {
return cache($name);
} else {
return cache($name, $value);
}
}
}

Loading…
Cancel
Save