1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?php
- return array
- (
- # 项目通信token
- 'token' => DEVER_PROJECT,
- # 语言包 暂时无用
- 'lang' => 'zh-cn',
- 'lang_pack' => array('zh-cn' => '简体中文', 'en' => '英文'),
- # 定义类型
- 'type' => array
- (
- # 资源
- 1 => 'place_source/info',
- 2 => 'place_source/content',
- 3 => 'place_act/review',
- ),
- # 路由解析设置
- 'route' => array
- (
- 'api/notify/(.*?)' => 'notify.common?s=$1',
- ),
- # 日志设置
- 'log' => array('type' => 'file', 'host' => 'host', 'port' => 'port'),
- # 调试的shell名
- 'shell' => 'debug',
- # 定义session
- //'session' => array('host' => '', 'port' => '', 'path' => '', 'cookie' => ''),
- # 定义数据库
- 'database' => array
- (
- # 是否自动建表 默认为true
- 'create' => true,
- # sql优化,暂时无用
- 'opt' => true,
- //'default' => array($env['db'], $env['db1'], 'type' => 'Pdo'),//读写分离
- 'default' => $env['db'],
- 'log' => $env['log'],
- # 分区设置
- 'partition' => array
- (
- # 当前数据库是否支持自动建库,不支持改成false,则database不会自动建库,而是类似table按照表拆分
- 'create' => true,
- # 类型:database 按照库拆分(分库) table 按照表拆分(分表) field 按照字段拆分(分区) where 按照条件拆分(分条件) Dever::session('database', 1)可以设置值
- 'database' => 'date("Y")',
- 'table' => 'date("Ym")',
- # 字段类型分几种:range范围、list列表、hash哈希、key分区
- 'field' => array
- (
- 'type' => 'range',
- 'field' => 'cdate',
- 'value' => 'date("Y-m-d 23:60:60")'//date("Y-m-d 23:60:60", strtotime("-1 day"))'
- ),
- /*
- 'field' => array
- (
- 'type' => 'list',
- 'field' => 'type',
- 'value' => array('1', '2', '3'),//3个值3个分区,然后也可以用Dever::call("manage/admin.test")来返回数组
- ),
- 'field' => array
- (
- 'type' => 'hash',
- 'field' => 'id',
- 'value' => '5'//5个分区
- ),
- 'field' => array
- (
- 'type' => 'key',
- 'field' => 'id',
- 'value' => '5'
- ),*/
- # where类型,一般在表中设置array('id' => 1),
- //'where' => 'Dever::call("manage/admin.test")'
- ),
- ),
- # 定义模板
- 'template' => array
- (
- 'name' => 'pc',//模板配置,如果有手机版,直接配置:'pc,mobile'
- 'replace' => array
- (
- '../' => '{$host}',
- ),
- ),
- # 定义redis
- 'redis' => $env['redis'],
- );
|