1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- # 集成项目的大部分配置,此为默认设置。环境不同,以下的配置也有可能不同,可以根据项目名建立配置文件
- # 数据库配置
- $config['database'] = array
- (
- # 默认数据库配置
- 'default' => array
- (
- 'type' => 'pdo',
- 'pdo_type' => 'mysql',//pgsql
- 'host' => array
- (
- 'read' => 'web-mysql:3306',
- 'update' => 'web-mysql:3306',
- //'read' => '192.168.1.203:3307',
- //'update' => '192.168.1.203:3307',
- ),
- 'database' => 'dever',
- 'username' => 'root',
- 'password' => '123456',
- 'charset' => 'utf8',
- ),
- );
- $local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
- # 本地可用这个
- $host = 'http://'.$local . '/';
- # 定义assets的域名
- $assets = DEVER_APP_HOST . 'assets/';
- $project_host = $host . '' . DEVER_PROJECT . '/';
- $package_host = $project_host . 'dever/package/';
- # 定义data域名
- $data_host = $project_host . 'data/';
- if (DEVER_APP_NAME == 'manage') {
- $assets = $package_host . 'manage/assets/';
- }
- # host 设置
- $config['host'] = array
- (
- # 跟域名
- 'base' => DEVER_APP_HOST,
- # cookie 域名
- 'cookie' => '',
-
- # assets网络路径,会自动将assets替换为assets/模板
- 'assets' => $assets,
- # 当前的assets路径
- 'css' => $assets . 'css/',
- 'js' => $assets . 'js/',
- 'img' => $assets . 'img/',
- 'images' => $assets . 'images/',
- 'lib' => $assets . 'lib/',
- # script组件路径
- 'script' => $package_host . 'script/assets/',
-
- # 上传系统的上传路径的域名(不带action)
- 'upload'=> $project_host . 'upload/?save',
- # 上传系统的资源访问地址
- 'uploadRes' => $data_host . 'upload/',
- );
- return $config;
|