Home > PHP Framework > YII > How to set default route in Yii?

How to set default route in Yii?

Release: 2020-03-11 13:34:57
Original
2354 people have browsed it

How to set default route in Yii?

Modify the configuration file:

return [
    'name'=>'AA后台',
    'id' => 'app-backend',
    'defaultRoute'=>'shop/index',//路由
    ……
];
Copy after login

127.0.0.1/index.php will automatically jump to shop/index.

The web.php file is The main configuration file contains database, routing and other information.

Recommended learning: yii framework

The above is the detailed content of How to set default route in Yii?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
yii
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template