You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.4 KiB
46 lines
1.4 KiB
<?php
|
|
|
|
// +----------------------------------------------------------------------
|
|
// | ThinkAdmin
|
|
// +----------------------------------------------------------------------
|
|
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
|
// +----------------------------------------------------------------------
|
|
// | 官方网站: http://demo.thinkadmin.top
|
|
// +----------------------------------------------------------------------
|
|
// | 开源协议 ( https://mit-license.org )
|
|
// +----------------------------------------------------------------------
|
|
// | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
|
// | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace app\index\controller;
|
|
|
|
/**
|
|
* 配置信息
|
|
* Class Index
|
|
* @package app\index\controller
|
|
*/
|
|
class Config extends Base
|
|
{
|
|
|
|
/**
|
|
* 获取配置信息
|
|
* @param string $name 配置key名称,支持逗号分割
|
|
* @return \type
|
|
*/
|
|
public function index($name = '')
|
|
{
|
|
if (!$name) {
|
|
return send_http_status(51005);
|
|
}
|
|
$name = explode(',', $name);
|
|
foreach ($name as $v) {
|
|
$_data[$v] = config($v);
|
|
}
|
|
if (is_array($_data)) {
|
|
return send_http_status(200, $_data);
|
|
}
|
|
return send_http_status(413);
|
|
}
|
|
|
|
}
|
|
|