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

  

posted on 2014-10-22 15:17  FreeSpider  阅读(3303)  评论(0编辑  收藏  举报