I have created one project in yii and my default controller points to site controller . I want to change it with some other and where i can specify default controller and action in yii.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You can add any where in return array protected/main.php
if you are working in modules base then you can add
Shop is module and index is controller
add the configuration in the config main.php
Perfect solution for changing the default controller. Part of the question was also to change the default action. If you've set
'defaultController' => 'home',
the default action will be'index' (unless set otherwise)
, you can change this in the controller like so:You can set controller to Default Controller in project directory protected/main.php add this code in array like $configArray = array()
And set the default action in Controller