Yii2 静态方法 中怎么触发事件 在ActiveRecord的init中写了一个简单的事件触发: PHP代码 public function init(){ $event = new XxxEvent(... 2016-10-28 · PHP · 阅读 17072
PHP 7 DomDocument not found 升到PHP7后,当用到DomDocument的时候,报错说class DomDocument not found。。。 用php -m|grep xml,可以... 2016-10-13 · PHP · 阅读 18676
去除内容中所有的多余的空格和空行 去除内容中所有的多余的空格和空行 PHP代码 php > $str = "a b c d\n\ne f g \t 2"; php > echo preg_repla... 2016-09-07 · PHP · 阅读 18628
Editor.md 上传图片的注意事项 一般情况下,editor.md的上传图片功能已经够用了,提供了两种方式:本地上传和跨域上传,方式也很简单,跨... 2016-09-02 · PHP · 阅读 20932
wordpress 升级遇到问题 升级wordpress的时候遇到:Briefly unavailable for scheduled maintenance. Check back in a minute. 其实... 2016-08-27 · PHP · 阅读 16456
ThinkPHP group count 如果用sql语句来写group by 再count,这样的sql太容易 了。但由于现在都是在用框架,反而这类sql变得难写了... 2016-08-17 · PHP · 阅读 19000
宁可错杀3000,不可放走一个 看到这个,应该明白了吧 delete from sablog_comments where visible =0 and content REGEXP '^{6} ' 定期... 2016-08-07 · PHP · 阅读 21195
composer引用本地git做为源库 PHP使用者大多对composer是又爱又恨,爱的是composer require后,很多类库不用去下载了,恨的是网速卡成翔... 2016-05-05 · PHP · 阅读 26728
Composer的Illegal offset type in isset or empty 标题的内容也是手贱导致的,本来composer不self-update也不会出现这个问题,这不,一升到最新的composer就... 2016-03-30 · PHP · 阅读 24738
The file or directory to be published does not exist: vendor/bower/jquery/dist 标题所说的问题可能早期用户都遇到过。但其实这个问题在官方也早就有解决方案了,不知道为什么还有人问起。... 2016-01-22 · PHP · 阅读 28694
imageworkshop中的position的说明及代码 position有9个点:lt,mt,rt,lm,mm,rm,lb,mb,rb,其实对应的是几个英文:lt(left top),mt(middle top),rt(ri... 2015-10-20 · PHP · 阅读 30770
access-control-allow-origin-multiple-origin-domains 原文来自:http://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-dom... 2015-09-07 · PHP · 阅读 24658
利用pubu.im来做BUG提醒工具 BUG提醒工具其实有很多,比如可以在有BUG的时候发封邮件到你的常用邮箱,这样你的手机上(邮件APP)就会收... 2015-08-13 · PHP · 阅读 25384
aliyun的dotdeb源有BUG 纯笔记做个记录 1、http://mirrors.aliyun.com/ ,这是阿里的源 2、这是dotdeb的说明:http://mirrors.aliy... 2015-07-06 · PHP · 阅读 23264
curl上传注意事项【新】 众所周知,用curl上传只要设置4个变量即可(非HTTPS网站),那就是curlopt_url,curlopt_post,curlopt_retur... 2015-06-19 · PHP · 阅读 26973