main.php 809 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. return [
  3. 'aliases' => [
  4. '@bower' => '@vendor/bower-asset',
  5. '@npm' => '@vendor/npm-asset',
  6. ],
  7. 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
  8. 'sourceLanguage' => 'en',
  9. 'language' => 'zh-CN',
  10. 'components' => [
  11. 'cache' => [
  12. 'class' => 'yii\caching\FileCache',
  13. ],
  14. 'redis' => [
  15. 'class' => 'yii\redis\Connection',
  16. 'hostname' => '127.0.0.1',
  17. 'port' => 6378,
  18. 'database' => 1,
  19. 'password' => 'redis12017',
  20. ],
  21. 'i18n' => [
  22. 'translations' => [
  23. '*' => [
  24. 'class' => 'yii\i18n\PhpMessageSource',
  25. 'basePath'=>'@common/messages',
  26. 'fileMap' => [
  27. 'common' => 'common.php',
  28. 'error' => 'errorCode.php',
  29. ],
  30. ],
  31. ],
  32. ],
  33. ],
  34. ];