web.php 712 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. $config = array(
  3. 'id' => 'bootstrap',
  4. 'basePath' => dirname(__DIR__),
  5. 'components' => array(
  6. 'cache' => array(
  7. 'class' => 'yii\caching\FileCache',
  8. ),
  9. 'user' => array(
  10. 'identityClass' => 'app\models\User',
  11. ),
  12. 'errorHandler' => array(
  13. 'errorAction' => 'site/error',
  14. ),
  15. 'log' => array(
  16. 'traceLevel' => YII_DEBUG ? 3 : 0,
  17. 'targets' => array(
  18. array(
  19. 'class' => 'yii\log\FileTarget',
  20. 'levels' => array('error', 'warning'),
  21. ),
  22. ),
  23. ),
  24. ),
  25. 'params' => require(__DIR__ . '/params.php'),
  26. );
  27. if (YII_ENV_DEV) {
  28. $config['preload'][] = 'debug';
  29. $config['modules']['debug'] = 'yii\debug\Module';
  30. $config['modules']['gii'] = 'yii\gii\Module';
  31. }
  32. return $config;