大飞_dafei

导航

上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 49 下一页

2018年11月25日 #

Yii2 layout 由 controller 向layout中传递参数值

摘要: Yii2 layout 由 controller 向layout中传递参数值 // controller public function actionIndex() { Yii::$app->view->params['model'] = "hello world"; return $this->r 阅读全文

posted @ 2018-11-25 14:24 大飞_dafei 阅读(191) 评论(0) 推荐(0)

2018年11月24日 #

Yii2 中 checkboxlist 复选框 默认选中

摘要: Yii2 中 checkboxlist 复选框 默认选中问题 方法1: 在 controller 中 model->字段 = 值; 比如: $model->type= 1; 方法2: <?= $form->field($model, 'type')->checkboxlist([ 1 => 'ite 阅读全文

posted @ 2018-11-24 22:04 大飞_dafei 阅读(440) 评论(0) 推荐(0)

2018年11月16日 #

centos 搭建redis主从

摘要: centos 搭建redis主从 !!! 由于这是在虚拟机中做的测试,配置过程中可能出现错误,记得看日志 查看主从信息: info replication 搭建主从确保,两台服务器直接可以连通, ping 连接ok, redis 互相可以登录 redis 主: 192.168.56.3 redis 阅读全文

posted @ 2018-11-16 16:03 大飞_dafei 阅读(90) 评论(0) 推荐(0)

2018年11月13日 #

php 魔术方法 __call

摘要: __call 魔术方法 //文件名字__call (自己随便起名字) /** * 在对象中调用一个不可访问方法时,__call() 会被调用。 * * 在静态上下文中调用一个不可访问方法时,__callStatic() 会被调用。 * * $name 参数是要调用的方法名称。$arguments 参 阅读全文

posted @ 2018-11-13 15:07 大飞_dafei 阅读(119) 评论(0) 推荐(0)

2018年11月9日 #

vargrant 安装 CentOS-7-x86_64

摘要: vargrant 安装 CentOS-7-x86_64 安装 vagrant , 安装 box 这里不再写,网上教程很多 1). yum install vim 2). yum install net-tools # 可以使用 ifconfig 3). 安装完centos,安装nginx: yum 阅读全文

posted @ 2018-11-09 17:09 大飞_dafei 阅读(348) 评论(0) 推荐(0)

MyISAM与innoDB存储引擎有何差别

摘要: A、两者在文件构成上有区别; B、InnoDB支持事务处理,MyISAM不支持; C、对无WHERE子句的COUNT(*)操作的不同:MyISAM中保存了该值,直接读取,InnoDB需要作全表扫描; D、锁的区别:InnoDB支持表级锁和行级锁,MyISAM只支持表级锁; E、索引会缓存数据,而MY 阅读全文

posted @ 2018-11-09 00:35 大飞_dafei 阅读(100) 评论(0) 推荐(0)

2018年11月6日 #

centos PHP7 yii2 报错 Call to undefined function yii\\helpers\\mb_strlen()

摘要: 出现问题 Call to undefined function yii\\helpers\\mb_strlen() "data": { "name": "Exception", "message": "Call to undefined function yii\\helpers\\mb_strle 阅读全文

posted @ 2018-11-06 16:33 大飞_dafei 阅读(320) 评论(0) 推荐(0)

2018年11月5日 #

Yii2 search 搜索[数据小部件--GridView--数据过滤]

摘要: Yii2 搜索条件,使用gii创建搜索模型 <?php namespace app\models; use Yii; use yii\base\Model; use yii\data\ActiveDataProvider; class PostSearch extends Post { public 阅读全文

posted @ 2018-11-05 16:54 大飞_dafei 阅读(242) 评论(0) 推荐(0)

php之 trim ltrim rtrim 小坑

摘要: php之 trim ltrim rtrim 小坑 trim, ltrim, rtrim , 有第二个参数,可以指定过滤的字符 小坑demo: //ltrim区分左边的 间隔就是右边第一个字符, 这样写没有可读性 $str = "qwertyuiop"; $bbb = ltrim($str,'qpwo 阅读全文

posted @ 2018-11-05 11:43 大飞_dafei 阅读(212) 评论(0) 推荐(0)

2018年11月3日 #

事务的四大特性,以及隔离级别

摘要: 转载: 事务的四大特性,以及隔离级别 四个特性: 原子性 , 一致性, 隔离性, 持久性 数据库提供的四种隔离级别: 01:Read uncommitted(读未提交):最低级别,任何情况都会发生。 02:Read Committed(读已提交):可避免脏读的发生。 03:Repeatable re 阅读全文

posted @ 2018-11-03 13:52 大飞_dafei 阅读(110) 评论(0) 推荐(0)

上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 49 下一页