Advertisement
Guest User

Untitled

a guest
Jan 7th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL ^ E_NOTICE);
  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. 'language'=>'it',//W l'Italia
  12. 'sourceLanguage'=>'it_IT',//W l'italiano
  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. 'application.modules.rights.*', //modulo rights
  21. 'application.modules.rights.components.*', //modulo rights
  22. ),
  23.  
  24. 'modules'=>array(
  25. // uncomment the following to enable the Gii tool
  26. 'gii'=>array(
  27. 'class'=>'system.gii.GiiModule',
  28. 'password'=>'********',
  29. // If removed, Gii defaults to localhost only. Edit carefully to taste.
  30. 'ipFilters'=>array('127.0.0.1','192.168.1.*'),
  31. ),
  32.  
  33. 'rights'=>array(
  34. 'install'=>true, //modulo rights
  35. ),
  36. ),
  37.  
  38. // application components
  39. 'components'=>array(
  40.  
  41. //RIGHTS
  42. 'user'=>array(
  43. 'class' => 'RWebUser', // Consento l'accesso implicitamente ai super users.
  44. 'allowAutoLogin'=>true, // abilito l' autenticazione basata su cookie
  45. ),
  46.  
  47. //dico a Yii che voglio gestire l'autenticazione utenti tramite db
  48. 'authManager'=>array(
  49. 'class'=>'RDbAuthManager',
  50. ),
  51.  
  52.  
  53. //LOG
  54. 'log'=>array(
  55. 'class'=>'CLogRouter',
  56. 'routes'=>array(
  57. array(
  58. 'class'=>'CFileLogRoute',
  59. 'levels'=>'error',
  60. ),
  61. array(
  62. 'class'=>'CFileLogRoute',
  63. 'levels'=>'info, trace',
  64. 'logFile'=>'infoMessages.log',
  65. ),
  66. 'class' => 'CWebLogRoute',
  67. 'levels' => 'example',
  68. 'showInFireBug' => TRUE,
  69. ),
  70.  
  71. array(
  72. 'class'=>'CEmailLogRoute',
  73. 'levels' => 'info,trace,error,warning,notice',
  74. 'emails'=>array('[email protected]'),
  75. ),
  76.  
  77. ),
  78.  
  79. 'user'=>array(
  80. // enable cookie-based authentication
  81. 'allowAutoLogin'=>true,
  82. ),
  83. // uncomment the following to enable URLs in path-format
  84. /*
  85. 'urlManager'=>array(
  86. 'urlFormat'=>'path',
  87. 'rules'=>array(
  88. '<controller:\w+>/<id:\d+>'=>'<controller>/view',
  89. '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
  90. '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
  91. ),
  92. ),
  93. */
  94. /*
  95. 'db'=>array(
  96. 'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
  97. ),
  98. */
  99. // uncomment the following to use a MySQL database
  100. 'db'=>array(
  101. 'connectionString' => 'mysql:host=localhost;dbname=testdrive',
  102. 'emulatePrepare' => true,
  103. 'username' => 'root',
  104. 'password' => '*****',
  105. 'charset' => 'utf8',
  106. 'enableParamLogging' => true,
  107. ),
  108.  
  109. 'errorHandler'=>array(
  110. // use 'site/error' action to display errors
  111. 'errorAction'=>'site/error',
  112. ),
  113. 'log'=>array(
  114. 'class'=>'CLogRouter',
  115. 'routes'=>array(
  116. array(
  117. 'class'=>'CFileLogRoute',
  118. 'levels'=>'error, warning',
  119. ),
  120. // uncomment the following to show log messages on web pages
  121. /*
  122. array(
  123. 'class'=>'CWebLogRoute',
  124. ),
  125. */
  126. ),
  127. ),
  128. ),
  129.  
  130. // application-level parameters that can be accessed
  131. // using Yii::app()->params['paramName']
  132. 'params'=>array(
  133. // this is used in contact page
  134. 'adminEmail'=>'[email protected]',
  135. ),
  136. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement