yii2怎么设置,url不加模块名,直接路由到默认模块

2025-04-23 01:19:29
推荐回答(1个)
回答1:

进入config/web.php,添加以下内容就可以了,upload是控制器/index是默认模块
'defaultRoute'=>'upload/index',