12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- $params = require __DIR__ . '/params.php';
- $rsparams['params'] = require_config('ueditor.php');
- $rsparams = array_merge_recursive(require_config('coin.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('commission.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('mailer.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('mapp.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('mp.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('openauth.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('openwx.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('oss.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('pay.php'), $rsparams);
- $rsparams = array_merge_recursive(require_config('point.php'), $rsparams);
- $params = array_merge($params,$rsparams['params']);
- $db = require __DIR__ . '/db.php';
- $config = [
- 'id' => 'console',
- 'controllerNamespace' => 'app\commands',
- 'language'=>$params['language'],
- 'bootstrap' => ['log'],
- //'defaultRoute'=>'user',//设置默认的控制器
- 'aliases' => [
- '@bower' => '@vendor/bower-asset',
- '@npm' => '@vendor/npm-asset',
- ],
- 'components' => [
- 'cache' => [
- 'class' => 'yii\caching\FileCache',
- ],
- 'log' => [
- 'targets' => [
- [
- 'class' => 'yii\log\FileTarget',
- 'levels' => ['error', 'warning'],
- ],
- ],
- ],
- 'mailer' => [
- 'class' => 'yii\swiftmailer\Mailer',
- 'viewPath' => BASE_PATH.'mail',
- // send all mails to a file by default. You have to set
- // 'useFileTransport' to false and configure a transport
- // for the mailer to send real emails.
- 'useFileTransport' => false,
- 'transport' => [
- 'class' => 'Swift_SmtpTransport',
- 'host' => $params['mailer']['host'],
- 'username' => $params['mailer']['username'],
- 'password' => $params['mailer']['password'],
- 'port' => $params['mailer']['port'],
- 'encryption' => $params['mailer']['encryption'],
- ],
- 'messageConfig'=>[
- 'charset'=>'UTF-8',
- 'from'=>[$params['mailer']['fromname']=>$params['mailer']['fromtitle']]
- ],
- ],
- ],
- 'params' => $params,
- ];
- if (YII_ENV_DEV) {
- // configuration adjustments for 'dev' environment
- $config['bootstrap'][] = 'gii';
- $config['modules']['gii'] = [
- 'class' => 'yii\gii\Module',
- ];
- }
- $config['components'] = array_merge($config['components'],$db);
- return $config;
|