| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 | 
							- <?php
 
- # 验证dc是否存在,一般在share目录下
 
- $dc = array();
 
- $dc_file = '/share/dc/config.php';
 
- if (is_file($dc_file)) {
 
-     $dc = include($dc_file);
 
- }
 
- if (isset($dc['data'])) {
 
-     $config['base']['data'] = $dc['data'];
 
- }
 
- $create = false;
 
- if (isset($dc['mysql']['create'])) {
 
-     $create = $dc['mysql']['create'];
 
- }
 
- $ip = isset($dc['host']) ? $dc['host'] : '192.168.33.10';
 
- $local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $ip;
 
- # 数据库配置
 
- $config['database'] = array
 
- (
 
-     'create' => $create,
 
- 	# 默认数据库配置
 
- 	'default' => array
 
- 	(
 
- 		'type' => 'pdo',
 
- 		'host' => array
 
- 		(
 
- 			'read' => isset($dc['mysql']) ? $dc['mysql']['host'] : 'web-mysql:3306',
 
- 			'update' => isset($dc['mysql']) ? $dc['mysql']['host'] : 'web-mysql:3306',
 
- 		),
 
- 		'database' => 'wonderful',
 
- 		'username' => isset($dc['mysql']) ? $dc['mysql']['username'] : 'root',
 
- 		'password' => isset($dc['mysql']) ? $dc['mysql']['password'] : '123456',
 
- 		'charset' => 'utf8',
 
- 	),
 
- );
 
- $config['debug'] = array
 
- (
 
- 	'log' => array('type' => 'file'),
 
- );
 
- $host = 'http://'.$local . '/';
 
- $upload = $host . 'upload/';
 
- $uploadcdn = $host . 'upload/data/';
 
- $config['host'] = array
 
- (
 
-     'upload'=> $upload . 'upload/?save',
 
-     'uploadRes'     => isset($dc['res']) && $dc['res'] ? $dc['res'] : $uploadcdn . 'upload/',
 
-     'project' => array
 
-     (
 
-         'upload' => array
 
-         (
 
-             'path' => $host. 'upload/upload/?',
 
-         ),
 
-         'pay' => array
 
-         (
 
-             'path' => $host. 'pay/pay/?',
 
-         ),
 
-         'wechat_applet' => array
 
-         (
 
-             'path' => $host. 'wechat/wechat_applet/?',
 
-         ),
 
-     ),
 
- );
 
- return $config;
 
 
  |