| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 | <?php/** * config.php UTF-8 * 配置文件 * * @date    : 2018/9/20 11:29 * * @license 这不是一个自由软件,未经授权不许任何使用和传播。 * @author  : wuyonghong <wyh@huosdk.com> * @version : HuoMp 1.0 */if (file_exists(GLOBAL_CONF_PATH."config.php")) {    $_global_config = include GLOBAL_CONF_PATH."config.php";} else {    $_global_config = [];}$configs = [    // +----------------------------------------------------------------------    // | 应用设置    // +----------------------------------------------------------------------    // 应用命名空间    'app_namespace'           => 'agent',    // 应用模式状态    'app_status'              => APP_DEBUG ? 'debug' : 'release',    // 是否支持多模块    'app_multi_module'        => true,    // 入口自动绑定模块    'auto_bind_module'        => false,    // 注册的根命名空间    'root_namespace'          => ['cmf'    => CMF_PATH, 'huo' => HUO_PATH, 'plugins' => PLUGINS_PATH,                                  'huolib' => HUOLIB_PATH],    // 扩展函数文件    'extra_file_list'         => [THINK_PATH.'helper'.EXT, CMF_PATH.'common'.EXT, HUO_PATH.'common'.EXT],    // 默认输出类型    'default_return_type'     => 'html',    // 默认AJAX 数据返回格式,可选json xml ...    'default_ajax_return'     => 'json',    // 默认JSONP格式返回的处理方法    'default_jsonp_handler'   => 'jsonpReturn',    // 默认JSONP处理方法    'var_jsonp_handler'       => 'callback',    // 默认时区    'default_timezone'        => 'PRC',    // 是否开启多语言    'lang_switch_on'          => true,    // 默认全局过滤方法 用逗号分隔多个    'default_filter'          => 'htmlspecialchars',    // 默认语言    'default_lang'            => 'en-us',    // 允许的语言    'header_accept_lang'      => ['en', 'zh', 'ar'],    // 应用类库后缀    'class_suffix'            => true,    // 控制器类后缀    'controller_suffix'       => true,    // +----------------------------------------------------------------------    // | 模块设置    // +----------------------------------------------------------------------    // 默认模块名    'default_module'          => 'agent',    // 禁止访问模块    'deny_module_list'        => ['common'],    // 默认控制器名    'default_controller'      => 'Index',    // 默认操作名    'default_action'          => 'Index',    // 默认验证器    'default_validate'        => '',    // 默认的空控制器名    'empty_controller'        => 'Error',    // 自动搜索控制器    'controller_auto_search'  => false,    // +----------------------------------------------------------------------    // | URL设置    // +----------------------------------------------------------------------    'pathinfo_depr'           => '/',    // URL伪静态后缀    'url_html_suffix'         => 'html',    // URL普通方式参数 用于自动生成    'url_common_param'        => false,    // URL参数方式 0 按名称成对解析 1 按顺序解析    'url_param_type'          => 0,    // 是否开启路由    'url_route_on'            => true,    // 路由配置文件(支持配置多个)    'route_config_file'       => ['route'],    // 是否强制使用路由    'url_route_must'          => false,    // 域名部署    'url_domain_deploy'       => false,    // 域名根,如thinkphp.cn    'url_domain_root'         => '',    // 是否自动转换URL中的控制器和操作名    'url_convert'             => true,    // 默认的访问控制器层    'url_controller_layer'    => 'controller',    // 表单请求类型伪装变量    'var_method'              => '_method',    // +----------------------------------------------------------------------    // | 模板设置    // +----------------------------------------------------------------------    'template'                => [        // 模板引擎类型 支持 php think 支持扩展        'type'         => 'Think',        // 视图根目录        'view_base'    => CMF_ROOT.'public/themes/agent/',        // 模板路径        'view_path'    => '',        // 模板后缀        'view_suffix'  => 'html',        // 模板文件名分隔符        'view_depr'    => DS,        // 模板引擎普通标签开始标记        'tpl_begin'    => '{',        // 模板引擎普通标签结束标记        'tpl_end'      => '}',        // 标签库标签开始标记        'taglib_begin' => '<',        // 标签库标签结束标记        'taglib_end'   => '>',    ],    // 视图输出字符串内容替换    'view_replace_str'        => [],    // 默认跳转页面对应的模板文件    'dispatch_success_tmpl'   => THINK_PATH.'tpl'.DS.'dispatch_jump.tpl',    'dispatch_error_tmpl'     => THINK_PATH.'tpl'.DS.'dispatch_jump.tpl',    // +----------------------------------------------------------------------    // | 异常及错误设置    // +----------------------------------------------------------------------    // 异常页面的模板文件    'exception_tmpl'          => THINK_PATH.'tpl'.DS.'think_exception.tpl',    // 错误显示信息,非调试模式有效    'error_message'           => '页面错误!请稍后再试~',    // 显示错误信息    'show_error_msg'          => false,    // 异常处理handle类 留空使用 \think\exception\Handle    'exception_handle'        => '',    // +----------------------------------------------------------------------    // | 日志设置    // +----------------------------------------------------------------------    'log'                     => [        // 日志记录方式,内置 file socket 支持扩展        'type'  => 'File',        // 日志保存目录        'path'  => LOG_PATH,        // 日志记录级别        'level' => [],    ],    // +----------------------------------------------------------------------    // | Trace设置 开启 app_trace 后 有效    // +----------------------------------------------------------------------    'trace'                   => [        // 内置Html Console 支持扩展        'type' => 'Html',    ],    // +----------------------------------------------------------------------    // | Cookie设置    // +----------------------------------------------------------------------    'cookie'                  => [        // cookie 名称前缀        'prefix'    => 'huo',        // cookie 保存时间        'expire'    => 0,        // cookie 保存路径        'path'      => '/',        // cookie 有效域名        'domain'    => '',        //  cookie 启用安全传输        'secure'    => false,        // httponly设置        'httponly'  => '',        // 是否使用 setcookie        'setcookie' => true,    ],    // +----------------------------------------------------------------------    // | 数据库设置    // +----------------------------------------------------------------------    'database'                => [        // 数据库调试模式        'debug'           => true,        // 数据集返回类型        'resultset_type'  => 'collection',        // 自动写入时间戳字段        'auto_timestamp'  => false,        // 时间字段取出后的默认时间格式        'datetime_format' => false,        // 是否需要进行SQL性能分析        'sql_explain'     => true,    ],    //分页配置    'paginate'                => [        'type'      => 'bootstrap',        'var_page'  => 'page',        'list_rows' => 15,    ],    // +----------------------------------------------------------------------    // | CMF 设置    // +----------------------------------------------------------------------    'cmf_theme_path'          => '../themes/',    'cmf_default_theme'       => 'agent',    'cmf_admin_theme_path'    => 'themes/',    'cmf_admin_default_theme' => 'web_simpleboot3',];return array_merge($_global_config, $configs);
 |