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

How to set default route in Yii?

尚
Original
2020-03-11 13:34:172375browse

How to set default route in Yii?

Modify the configuration file:

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

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!

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