You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1.3 KiB

  1. <?php
  2. $params = array_merge(
  3. require(ROOT_PATH . '/console/config/params.php'),
  4. require(ROOT_PATH . '/console/config/params-local.php')
  5. );
  6. return [
  7. 'charset' => 'utf-8',
  8. 'language' => 'zh-CN',
  9. 'timeZone' => 'Asia/Shanghai',
  10. 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
  11. 'id' => 'app-console',
  12. 'basePath' => dirname(__DIR__),
  13. 'bootstrap' => ['log'],
  14. 'controllerNamespace' => 'console\controllers',
  15. 'controllerMap' => [
  16. 'fixture' => [
  17. 'class' => 'yii\console\controllers\FixtureController',
  18. 'namespace' => 'common\fixtures',
  19. ],
  20. ],
  21. 'components' => [
  22. 'mongodb'=>[
  23. 'class' => '\yii\mongodb\Connection',
  24. 'dsn'=>'mongodb://127.0.0.1:27017/zzcx'
  25. ],
  26. 'log' => [
  27. 'targets' => [
  28. [
  29. 'class' => 'yii\log\FileTarget',
  30. 'levels' => ['error', 'warning'],
  31. ],
  32. ],
  33. ],
  34. 'db' => [
  35. 'class' => 'yii\db\Connection',
  36. 'dsn' => 'mysql:host=106.14.56.77;dbname=fx',
  37. 'username' => 'spider',
  38. 'password' => 'PjGPWNUgOYe6i1Ef',
  39. 'charset' => 'utf8',
  40. ],
  41. ],
  42. 'params' => $params,
  43. ];