console.php 858 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // This is the configuration for yiic console application.
  3. // Any writable CConsoleApplication properties can be configured here.
  4. return array(
  5. 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
  6. 'name'=>'My Console Application',
  7. // preloading 'log' component
  8. 'preload'=>array('log'),
  9. // application components
  10. 'components'=>array(
  11. 'db'=>array(
  12. 'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
  13. ),
  14. // uncomment the following to use a MySQL database
  15. /*
  16. 'db'=>array(
  17. 'connectionString' => 'mysql:host=localhost;dbname=testdrive',
  18. 'emulatePrepare' => true,
  19. 'username' => 'root',
  20. 'password' => '',
  21. 'charset' => 'utf8',
  22. ),
  23. */
  24. 'log'=>array(
  25. 'class'=>'CLogRouter',
  26. 'routes'=>array(
  27. array(
  28. 'class'=>'CFileLogRoute',
  29. 'levels'=>'error, warning',
  30. ),
  31. ),
  32. ),
  33. ),
  34. );