Set default controller
Add configuration in /protected/config/main.php
Copy code The code is as follows:
return array(
'name'=> ;'Auto',
'defaultController'=>'auto',
The default controller configured above is AutoController.php
Set default action
Set in AutoController.php
Copy code The code is as follows:
class AutoController extends CController
{
public $defaultAction = 'test' ;
public function actionTest()
{
...
}
...
At this time, accessing xxxx/index.php will by default go to xxxx/index.php?r=auto/test
http://www.bkjia.com/PHPjc/763013.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/763013.htmlTechArticleSet the default controller. Add the configuration in /protected/config/main.php and copy the code. The code is as follows: ?php return array( 'name'='Auto', 'defaultController'='auto', the above configures the default co...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn