<?php //url创建
echo Url::to(''); // same controller, different action // /index.php?r=management/default/page&id=contact echo Url::toRoute(['page', 'id' => 'contact']); // same module, different controller and action // /index.php?r=management/post/index echo Url::toRoute('post/index'); echo \Yii::$app->urlManager->createUrl(['site/page', 'id' => 'about']); ?>