yii1.0怎么修改默认控制器 [ 1.0 版本 ]
defaultController我已经设置为index了,可我直接访问localhost 还是跳转到localhost/site/login
哪位大神帮我看看哪里的问题
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'11111',
'theme'=>'classic',
'language'=>'zh_cn',
// preloading 'log' component
'preload'=>array('log1','booster'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'defaultController'=>"Index",
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'1111',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('192.1.2.5','::1'),
),
'ycm'=>array(
'username'=>'111',
'password'=>'111',
'uploadCreate'=>true,
'redactorUpload'=>true,
'registerModels'=>array(
// 'application.models.*',
'application.models.Category',
'application.models.MCategoryGroup',
'application.models.Course',
'application.models.Lesson',
'application.models.Exam',
'application.models.ExamQuestion',
'application.models.Group',
'application.models.Member',
'application.models.Teacher',
'application.models.Comment',
'application.models.Feedback',
),
'excludeModels'=>array(
'LoginForm','ContactForm'
),
),
),
// application components
'components'=>array(
'booster'=>array(
'class'=>'ext.booster.components.Booster',
// 'coreCss'=>false,
'fontAwesomeCss'=>true,
'responsiveCss'=>false,
),
'mailer'=>array(
'class'=>'ext.sm.SwiftMailer',
'mailer'=>'smtp',
'host'=>'1111.com',
'username'=>'1111@qq.com',
'password'=>'111',
'From'=>'111@qq.com',
),
// 'clientScript'=>array(
// ''
// ),
/*'cache'=>array(
'class'=>'CFileCache',
),*/
'user'=>array(
'class'=>'WebUser',
// 'stateKeyPrefix'=>'frontend',
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// uncomment the following to enable URLs in path-format
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<action:\w+>-<id:\d+>.html'=>'index/<action>',
'<action:\w+>.html'=>'index/<action>',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
// database settings are configured in database.php
'db'=>require(dirname(__FILE__).'/database.php'),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=> (strtolower($_SERVER['SERVER_NAME']) == "www.111.com" || strtolower($_SERVER['SERVER_NAME']) == "111.com")?'index/error':null,
//'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',
// 'levels'=>'trace',
'categories'=>array(
// 'system.db.*',
),
),
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'1111@example.com',
),
);
辰枫夜雨
注册时间:2015-08-11
最后登录:2017-06-23
在线时长:18小时59分
最后登录:2017-06-23
在线时长:18小时59分
- 粉丝10
- 金钱0
- 威望0
- 积分180