Advertisement
Guest User

Untitled

a guest
Feb 15th, 2015
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. ?php
  2.  
  3. // uncomment the following to define a path alias
  4. // Yii::setPathOfAlias('local','path/to/local-folder');
  5.  
  6. // This is the main Web application configuration. Any writable
  7. // CWebApplication properties can be configured here.
  8. return array(
  9. 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
  10. 'name'=>'My Web Application',
  11.  
  12. 'language'=>'pl',
  13. // preloading 'log' component
  14. 'preload'=>array('log'),
  15.  
  16. // autoloading model and component classes
  17. 'import'=>array(
  18. 'application.models.*',
  19. 'application.components.*',
  20. ),
  21.  
  22. 'modules'=>array(
  23. // uncomment the following to enable the Gii tool
  24. /*
  25. 'gii'=>array(
  26. 'class'=>'system.gii.GiiModule',
  27. 'password'=>'Enter Your Password Here',
  28. // If removed, Gii defaults to localhost only. Edit carefully to taste.
  29. 'ipFilters'=>array('127.0.0.1','::1'),
  30. ),
  31. */
  32. ),
  33.  
  34. // application components
  35. 'components'=>array(
  36.  
  37. 'user'=>array(
  38. // enable cookie-based authentication
  39. 'allowAutoLogin'=>true,
  40. ),
  41.  
  42. // uncomment the following to enable URLs in path-format
  43.  
  44. 'urlManager'=>array(
  45. 'urlFormat'=>'path',
  46. 'rules'=>array(
  47. '<controller:\w+>/<id:\d+>'=>'<controller>/view',
  48. '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
  49. '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
  50. 'strona/policz/<liczba1:\d+>/<liczba2:\d+>'=>'strona/policz/',
  51. ),
  52. ),
  53.  
  54.  
  55. // database settings are configured in database.php
  56. 'db'=>require(dirname(__FILE__).'/database.php'),
  57.  
  58. 'db2'=>array(
  59. 'class'=>'CDbConnection',
  60. 'connectionString' => 'mysql:host=localhost;dbname=test2',
  61. 'emulatePrepare' => true,
  62. 'username' => 'root',
  63. 'password' => 'root',
  64. 'charset' => 'utf8',
  65. ) ,
  66.  
  67. 'errorHandler'=>array(
  68. // use 'site/error' action to display errors
  69. 'errorAction'=>'site/error',
  70. ),
  71.  
  72. 'log'=>array(
  73. 'class'=>'CLogRouter',
  74. 'routes'=>array(
  75. array(
  76. 'class'=>'CFileLogRoute',
  77. 'levels'=>'error, warning',
  78. ),
  79. // uncomment the following to show log messages on web pages
  80. /*
  81. array(
  82. 'class'=>'CWebLogRoute',
  83. ),
  84. */
  85. ),
  86. ),
  87.  
  88. ),
  89.  
  90. // application-level parameters that can be accessed
  91. using Yii::app()->params['paramName']
  92. 'params'=>array(
  93. // this is used in contact page
  94. 'adminEmail'=>'webmaster@example.com',
  95. ),
  96. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement