Yii2的主从数据库设置 在yii1的时候,主从数据库的支持没有那么方便,只能写上多个DB的components,然后在AR的getDB中返回相应的d... 2016-11-18 · PHP Framework
Yii2 静态方法 中怎么触发事件 在ActiveRecord的init中写了一个简单的事件触发: PHP代码 public function init(){ $event = new XxxEvent(... 2016-10-28 · PHP
Yii2 updateAll tips Yii2 中的updateAll可以接受三个参数,$attributes,$condition,$params = null 第一个参数是要更新的值,第... 2016-10-17 · PHP
PHP 7 DomDocument not found 升到PHP7后,当用到DomDocument的时候,报错说class DomDocument not found。。。 用php -m|grep xml,可以... 2016-10-13 · PHP
记录点月饼事件(存档) 起因,不说了,后来知乎上有人创建了一条:https://www.zhihu.com/question/50600301 接连补充了4条,不排... 2016-09-18 · Misc
去除内容中所有的多余的空格和空行 去除内容中所有的多余的空格和空行 PHP代码 php > $str = "a b c d\n\ne f g \t 2"; php > echo preg_repla... 2016-09-07 · PHP