摘要: 先将官网下载的压缩包解压,将advanced文件夹在网站根目录中 2.右键“我的电脑”-> 属性 ->高级系统设置,将php.exe所在目录(c:\xampp\php)以及c:\xampp\php\ext目录的路径加入到path中 3.运行advanced下init.bat程序,执行init或在安装 阅读全文
posted @ 2017-01-08 09:11 longzhankunlun 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 阅读全文
posted @ 2017-01-08 09:10 longzhankunlun 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 <?= 阅读全文
posted @ 2017-01-08 09:08 longzhankunlun 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 在advanced\console\migrations文件夹下有一个 m130524_201442_init.php 文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 <?php use 阅读全文
posted @ 2017-01-08 09:02 longzhankunlun 阅读(6265) 评论(0) 推荐(0) 编辑
摘要: 我们假设全局性的公共类文件位于common/components/Helper.php,其内容如下: 1 2 3 4 5 6 7 8 9 <?php namespace common\components; class Helper { public function checkedMobile ( 阅读全文
posted @ 2017-01-08 09:01 longzhankunlun 阅读(2092) 评论(0) 推荐(0) 编辑
摘要: 有两个例子:刷新时间和数据显示排序 1、刷新时间 (1)控制器中的方法:Time 1 2 3 4 public function actionTime() { return $this->render('time',['time'=>date("h:i:s")]); } 1 2 3 4 public 阅读全文
posted @ 2017-01-08 09:01 longzhankunlun 阅读(553) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 public function actionContact() { $model = new ContactForm(); if ($model->load(Yii::$app->request->post()) && $ 阅读全文
posted @ 2017-01-08 09:00 longzhankunlun 阅读(924) 评论(0) 推荐(0) 编辑
摘要: 简介 在许多博客和社区文章底部都有上一篇或者下一篇的链接,有童鞋问这个yii2要如何实现呢?其实很简单,稍微点一下大家就明白了。 实例 其实很简单,我们有的条件就是当前文章的ID($id),那么我们去查询当前id的下一条有效的数据就是下一篇的内容了,看下代码 1.yii2中默认的详情页是如下所示: 阅读全文
posted @ 2017-01-08 08:59 longzhankunlun 阅读(258) 评论(0) 推荐(0) 编辑
摘要: cmd命令窗,先切换到advanced目录下(即有composer.json的文件夹下) composer update yiisoft/yii2 yiisoft/yii2-composer bower-asset/jquery.inputmask composer require dmstr/yi 阅读全文
posted @ 2017-01-08 08:58 longzhankunlun 阅读(1534) 评论(0) 推荐(0) 编辑
摘要: 存取控制过滤器(ACF)详细 https://www.yiichina.com/doc/guide/2.0/security-authorization RBAC简介 1.mysql添加表 打开\vendor\yiisoft\yii2\rbac\migrations\schema-mysql.sql 阅读全文
posted @ 2017-01-08 08:56 longzhankunlun 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 其实生成在了web目录下 views路径应该在前面加@路径用"/"正斜杠代替,如下 @frontend/modules/you/views/arctravel 这就不会出现生成路径错误了 阅读全文
posted @ 2017-01-08 08:54 longzhankunlun 阅读(806) 评论(0) 推荐(0) 编辑