132 lines
5.2 KiB
PHP
Executable File
132 lines
5.2 KiB
PHP
Executable File
<?php
|
||
|
||
return [
|
||
// 应用调试模式
|
||
'app_debug' => true,
|
||
// 应用Trace
|
||
'app_trace' => false,
|
||
// 默认语言
|
||
'default_lang' => 'zh-cn',
|
||
// 开启语言切换
|
||
'lang_switch_on' => true,
|
||
// 扩展函数文件
|
||
'extra_file_list' => [APP_PATH . 'helper.php', THINK_PATH . 'helper.php'],
|
||
// 默认跳转页面对应的模板文件
|
||
'dispatch_success_tmpl' => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'dispatch_jump.tpl',
|
||
'dispatch_error_tmpl' => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'dispatch_jump.tpl',
|
||
// +----------------------------------------------------------------------
|
||
// | 异常及错误设置
|
||
// +----------------------------------------------------------------------
|
||
// 异常页面的模板文件
|
||
//'exception_tmpl' => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . '404.html',
|
||
'exception_tmpl' => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'think_exception.tpl',
|
||
// 错误显示信息,非调试模式有效
|
||
'error_message' => '您所浏览的页面暂时无法访问',
|
||
// 显示错误信息
|
||
'show_error_msg' => true,
|
||
// +----------------------------------------------------------------------
|
||
// | 会话设置
|
||
// +----------------------------------------------------------------------
|
||
'session' => [
|
||
'id' => '',
|
||
// SESSION_ID的提交变量,解决flash上传跨域
|
||
'var_session_id' => '',
|
||
// 驱动方式 支持redis memcache memcached
|
||
'type' => '\session\driver\Sesssql',
|
||
'connection' => ['table' => 'session'],
|
||
// 是否自动开启 SESSION
|
||
'auto_start' => true,
|
||
'httponly' => true,
|
||
'secure' => false,
|
||
],
|
||
//静态缓存配置
|
||
'html_cache_module' => ['index'], // 开启特定模块静态缓存
|
||
'html_cache_on' => true, // 开启静态缓存
|
||
'html_cache_time' => 3600, // 全局静态缓存有效期(秒)
|
||
'html_file_suffix' => '.shtml', // 设置静态缓存文件后缀
|
||
'html_cache_compile_type' => 'file', //缓存存储驱动
|
||
'html_cache_rules' => array(// 定义静态缓存规则
|
||
// // 定义格式1 数组方式
|
||
//'静态地址' => array('静态规则', '有效期', '附加规则'),
|
||
//1.任意控制器的任意操作都适用
|
||
'*' => array('{$_SERVER.REQUEST_URI|md5}'),
|
||
//2.任意控制器的md5操作
|
||
'md5' => array('{:module}/{:controller}/{:action}_{id|md5}'),
|
||
//3.Static控制器的所有操作
|
||
'Static:' => array('{:module}/{:controller}/{:action}', 30), //第一个参数是构造的字符串,后面是缓存50秒
|
||
//4.Hmtl控制器的md5操作
|
||
'Html:md5' => array('{:module}/{:controller}/{:action}'),
|
||
),
|
||
'single_route_rules' => [
|
||
1 => 'joinin',
|
||
2 => 'contact',
|
||
3 => 'map',
|
||
4 => 'item',
|
||
],
|
||
'product_color' => [
|
||
'red' => '红色', 'blue' => '蓝色', 'gold' => '金色', 'white' => '白色', 'pink' => '粉色', 'black' => '黑色', 'gray' => '灰色', 'green' => '绿色',
|
||
],
|
||
'products_zh_color' => [
|
||
'RD' => '红色',
|
||
'BL' => '蓝色',
|
||
'GD' => '金色',
|
||
'WH' => '白色',
|
||
'PK' => '粉色',
|
||
'BK' => '黑色',
|
||
'GY' => '灰色',
|
||
'GR' => '绿色',
|
||
'SV' => '银色',
|
||
'YL' => '黄色',
|
||
'OR' => '橙色',
|
||
'PU' => '紫色',
|
||
'CF' => '咖啡色',
|
||
'RG' => '玫瑰金色',
|
||
'CO' => '多彩色',
|
||
'CR' => '透明色',
|
||
'WD' => '木纹色',
|
||
],
|
||
'products_us_color' => [
|
||
'RD' => 'Red',
|
||
'BL' => 'Blue',
|
||
'GD' => 'Gold',
|
||
'WH' => 'White',
|
||
'PK' => 'Pink',
|
||
'BK' => 'Black',
|
||
'GY' => 'Grey',
|
||
'GR' => 'Green',
|
||
'SV' => 'Silver',
|
||
'YL' => 'Yellow',
|
||
'OR' => 'Orange',
|
||
'PU' => 'Purple',
|
||
'CF' => 'Coffee',
|
||
'RG' => 'Rose Gold',
|
||
'CO' => 'Colorful',
|
||
'CR' => 'Clear',
|
||
'WD' => 'Wood Texture',
|
||
],
|
||
'product_dltype' => ['1' => '驱动下载', '2' => '固件下载', '3' => '软件下载', '4' => '说明书下载', '5' => 'Software Drivers', '6' => ' Instructions Download'],
|
||
// 导航数据类型
|
||
'common_nav_type_list' => array(
|
||
'custom' => '自定义',
|
||
'article' => '文章',
|
||
'blog' => '博客',
|
||
'goods_category' => '商品',
|
||
),
|
||
// 导航数据类型
|
||
'common_data_type_list' => array(
|
||
'header' => '顶部导航',
|
||
'footer' => '底部导航',
|
||
'tops_nas_header' => 'NAS专题页顶部导航'
|
||
),
|
||
'pageinate' => [
|
||
'type' => 'page\Page',
|
||
'car_page' => 'page',
|
||
'list_rows' => 15,
|
||
],
|
||
// 指令定义
|
||
'commands' => [
|
||
'NewKafkaConsumer' => 'app\command\NewKafkaConsumer',
|
||
],
|
||
|
||
];
|