1
我使用urlManager的createAbsoluteUrl方法来生成一个URL来查看消息ID的消息模型的实例。yii2高级2.06 createAbsoluteUrl
Yii::$app->urlManager->createAbsoluteUrl(['/message/view', 'id'=>$model->id, '#' => $model->id])
这generates- http://localhost/advancedyii2/frontend/web/index.php?r=message#
但是,我要求 - http://localhost/advancedyii2/frontend/web/index.php?r=message%2Fview&id=1
你能找出问题所在?
感谢, PF
show you config/main.php组件urlManager – scaisEdge