Yii2 基础学习

<?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']); ?>

  

你可能感兴趣的:(yii2)