123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <?php
- // uncomment the following to define a path alias
- // Yii::setPathOfAlias('local','path/to/local-folder');
- // This is the main Web application configuration. Any writable
- // CWebApplication properties can be configured here.
- return array(
- 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
- 'name'=>'My Web Application',
- // preloading 'log' component
- 'preload'=>array('log'),
-
- //设置默认控制器
- 'defaultController' => 'login',
- // autoloading model and component classes
- 'import'=>array(
- 'application.models.*',
- 'application.components.*',
- ),
- 'modules'=>array(
- // uncomment the following to enable the Gii tool
- /*
- 'gii'=>array(
- 'class'=>'system.gii.GiiModule',
- 'password'=>'Enter Your Password Here',
- // If removed, Gii defaults to localhost only. Edit carefully to taste.
- 'ipFilters'=>array('127.0.0.1','::1'),
- ),
- */
- ),
- // application components
- 'components'=>array(
- 'user'=>array(
- // enable cookie-based authentication
- 'allowAutoLogin'=>true,
- ),
- // uncomment the following to enable URLs in path-format
-
- 'urlManager'=>array(
- 'urlFormat'=>'path',
- /*'rules'=>array(
- '<controller:\w+>/<id:\d+>'=>'<controller>/view',
- '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
- '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
- ),*/
- ),
-
-
- // 页面跳转 扩展类在protected/extensions/jumpage
- 'jump'=>array(
- 'class'=>'ext.jumpage.jumpage',
- // 'successWait'=>500,//成功提示等待跳转时间,可以不指定,默认是2秒
- // 'errorWait'=>6 //错误信息等待跳转时间,同上,默认3秒
- ),
-
- // database settings are configured in database.php
- /* 'db'=>array(
- 'connectionString' => 'mysql:host=192.168.1.232:3306;dbname=school',
- 'emulatePrepare' => true,
- 'username' => 'root',
- 'password' => 'lc12345',
- 'charset' => 'utf8',
- //'tablePrefix' => 'hd_',
- 'enableProfiling'=>true,
- 'enableParamLogging'=>true,
- ), */
-
- // 业务数据库
- 'businessDb'=>array(
- 'class' => 'CDbConnection',
- 'connectionString' => 'mysql:host=192.168.1.210:3307;dbname=spider_business',
- 'emulatePrepare' => true,
- 'username' => 'zsy',
- 'password' => 'lc12345',
- 'charset' => 'utf8',
- 'enableParamLogging' => true,
- 'schemaCachingDuration' => 5,
- 'schemaCacheID' => 'tableCache',
- ),
- 'errorHandler'=>array(
- // use 'site/error' action to display errors
- 'errorAction'=>'site/error',
- ),
- 'log'=>array(
- 'class'=>'CLogRouter',
- 'routes'=>array(
- array(
- 'class'=>'CFileLogRoute',
- 'levels'=>'error, warning',
- ),
- // uncomment the following to show log messages on web pages
- /*
- array(
- 'class'=>'CWebLogRoute',
- ),
- */
- ),
- ),
- //redis
- 'cache' => array(
- 'class'=>'ext.redis.CRedisCache',
- 'servers'=>array(
- array(
- 'host'=>'127.0.0.1',
- 'port'=>6379,
- // 'connection_timeout'=>86400,
- ),
- ),
- ),
- ),
- // application-level parameters that can be accessed
- // using Yii::app()->params['paramName']
- 'params'=>array(
- // this is used in contact page
- //'adminEmail'=>'webmaster@example.com',
- 'material_url' => 'http://wybrain.xueping365.com/rest/textbook/tree',
- 'material_param'=> 'subjectId=3&depth=3',
-
- 'week_wp' => 'http://wyapi.xueping365.com/rest/printer/wp', //周周练
- 'week_wb' => 'http://wyapi.xueping365.com/rest/printer/wb', //错题本
- 'week_isp' => 'http://wyapi.xueping365.com/rest/printer/isp', //提分册
-
- // 接口请求验证账号
- 'api_verify_username' => 'zxhx',
- 'api_verify_password' => '533166afe82356ff5bc22ae9a263fb4e',
- // 接口请求验证账号
- 'api_verify_username' => 'zxhx',
- 'api_verify_password' => '533166afe82356ff5bc22ae9a263fb4e',
- 'APPID'=>'wx550c5faad1c6642a',
- 'secret'=>'d4624c36b6795d1d99dcf0547af5443d',
- 'redis_on_off'=>1,
- 'redis_expires'=>7000,
- 'weixin_realm'=>'http://wyprwx.xueping365.com',
- 'pay_product_info'=>'漫行旅游',
- ),
- );
|