main.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?php
  2. // uncomment the following to define a path alias
  3. // Yii::setPathOfAlias('local','path/to/local-folder');
  4. // This is the main Web application configuration. Any writable
  5. // CWebApplication properties can be configured here.
  6. return array(
  7. 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
  8. 'name'=>'My Web Application',
  9. // preloading 'log' component
  10. 'preload'=>array('log'),
  11. //设置默认控制器
  12. 'defaultController' => 'login',
  13. // autoloading model and component classes
  14. 'import'=>array(
  15. 'application.models.*',
  16. 'application.components.*',
  17. ),
  18. 'modules'=>array(
  19. // uncomment the following to enable the Gii tool
  20. /*
  21. 'gii'=>array(
  22. 'class'=>'system.gii.GiiModule',
  23. 'password'=>'Enter Your Password Here',
  24. // If removed, Gii defaults to localhost only. Edit carefully to taste.
  25. 'ipFilters'=>array('127.0.0.1','::1'),
  26. ),
  27. */
  28. ),
  29. // application components
  30. 'components'=>array(
  31. 'user'=>array(
  32. // enable cookie-based authentication
  33. 'allowAutoLogin'=>true,
  34. ),
  35. // uncomment the following to enable URLs in path-format
  36. 'urlManager'=>array(
  37. 'urlFormat'=>'path',
  38. /*'rules'=>array(
  39. '<controller:\w+>/<id:\d+>'=>'<controller>/view',
  40. '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
  41. '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
  42. ),*/
  43. ),
  44. // 页面跳转 扩展类在protected/extensions/jumpage
  45. 'jump'=>array(
  46. 'class'=>'ext.jumpage.jumpage',
  47. // 'successWait'=>500,//成功提示等待跳转时间,可以不指定,默认是2秒
  48. // 'errorWait'=>6 //错误信息等待跳转时间,同上,默认3秒
  49. ),
  50. // database settings are configured in database.php
  51. /* 'db'=>array(
  52. 'connectionString' => 'mysql:host=192.168.1.232:3306;dbname=school',
  53. 'emulatePrepare' => true,
  54. 'username' => 'root',
  55. 'password' => 'lc12345',
  56. 'charset' => 'utf8',
  57. //'tablePrefix' => 'hd_',
  58. 'enableProfiling'=>true,
  59. 'enableParamLogging'=>true,
  60. ), */
  61. // 业务数据库
  62. 'businessDb'=>array(
  63. 'class' => 'CDbConnection',
  64. 'connectionString' => 'mysql:host=192.168.1.210:3307;dbname=spider_business',
  65. 'emulatePrepare' => true,
  66. 'username' => 'zsy',
  67. 'password' => 'lc12345',
  68. 'charset' => 'utf8',
  69. 'enableParamLogging' => true,
  70. 'schemaCachingDuration' => 5,
  71. 'schemaCacheID' => 'tableCache',
  72. ),
  73. 'errorHandler'=>array(
  74. // use 'site/error' action to display errors
  75. 'errorAction'=>'site/error',
  76. ),
  77. 'log'=>array(
  78. 'class'=>'CLogRouter',
  79. 'routes'=>array(
  80. array(
  81. 'class'=>'CFileLogRoute',
  82. 'levels'=>'error, warning',
  83. ),
  84. // uncomment the following to show log messages on web pages
  85. /*
  86. array(
  87. 'class'=>'CWebLogRoute',
  88. ),
  89. */
  90. ),
  91. ),
  92. //redis
  93. 'cache' => array(
  94. 'class'=>'ext.redis.CRedisCache',
  95. 'servers'=>array(
  96. array(
  97. 'host'=>'127.0.0.1',
  98. 'port'=>6379,
  99. // 'connection_timeout'=>86400,
  100. ),
  101. ),
  102. ),
  103. ),
  104. // application-level parameters that can be accessed
  105. // using Yii::app()->params['paramName']
  106. 'params'=>array(
  107. // this is used in contact page
  108. //'adminEmail'=>'webmaster@example.com',
  109. 'material_url' => 'http://wybrain.xueping365.com/rest/textbook/tree',
  110. 'material_param'=> 'subjectId=3&depth=3',
  111. 'week_wp' => 'http://wyapi.xueping365.com/rest/printer/wp', //周周练
  112. 'week_wb' => 'http://wyapi.xueping365.com/rest/printer/wb', //错题本
  113. 'week_isp' => 'http://wyapi.xueping365.com/rest/printer/isp', //提分册
  114. // 接口请求验证账号
  115. 'api_verify_username' => 'zxhx',
  116. 'api_verify_password' => '533166afe82356ff5bc22ae9a263fb4e',
  117. // 接口请求验证账号
  118. 'api_verify_username' => 'zxhx',
  119. 'api_verify_password' => '533166afe82356ff5bc22ae9a263fb4e',
  120. 'APPID'=>'wx550c5faad1c6642a',
  121. 'secret'=>'d4624c36b6795d1d99dcf0547af5443d',
  122. 'redis_on_off'=>1,
  123. 'redis_expires'=>7000,
  124. 'weixin_realm'=>'http://wyprwx.xueping365.com',
  125. 'pay_product_info'=>'漫行旅游',
  126. ),
  127. );