摘要:
1.在widgets/TestWidget.php中 2.在widgets/views/index.php 3.在其他需要使用的视图文件中 如下调用即可 注:~ 转载请注明出处。QQ1727728211 阅读全文
摘要:
这是第一种方法,还有另一种方法,其实都差不多。 1.在创建widgets\HelloWiget.php 2.在视图中调用 说明:创建好widget后,可以在其他任意视图中进行调用 例如在views/test/index.php中 注:~ 转载请注明出处。QQ1727718211 阅读全文
摘要:
1.控制器中CacheDemoController.php 2.视图view/cache-demo/index.php 后边为index2 index2.php index3.php 注:~ 转载请注明出处。QQ1727728211 阅读全文
摘要:
一、 [:id占位符]使用 $results = Test::findBySql($sql,array(':id'=>'1 or 1=1))->all() 二、 [id=1] 选出id为1的数据 $results = Test::find()->where(['id'=>1])-all(); 三、 阅读全文
摘要:
1.model中models/article.php 2.控制器中ArticleController.php 3.视图中view/article/index.php 这个是很基础的model使用,如有不对,请联系我。QQ1727728211 阅读全文
摘要:
1.创建BiaodanController.php 2.创建model,biaodan.php 3.视图文件view/index.php index-two.php 阅读全文