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.O学习三 前后台用户数据表分离


下一篇:Yii2.0学习笔记:第一个页面Saying Hello