随笔分类 -  php

摘要:1、安装 tideways_xhprof 拓展 php是编译安装的: 1 [root@localhost ~]# cd /datas/package/ 2 [root@localhost package]# wget https://github.com/tideways/php-xhprof-ex 阅读全文
posted @ 2022-09-26 14:55 andy_chan 阅读(251) 评论(0) 推荐(0)
摘要:最近有个项目用到了最新的TP3.2.5,发现有个报错:There is no active transaction,后来定位分析到是TP代码bug,由于官方已经不维护且无法提交issue,故做此记录。 测试代码: 1 try { 2 $uModel = M('Users'); 3 $uModel-> 阅读全文
posted @ 2020-03-25 14:05 andy_chan 阅读(759) 评论(0) 推荐(0)
摘要:安装php拓展 imagick,上来就编译 ImageMagick,出现各种问题: 1 convert: no decode delegate for this image format `JPG' @ error/constitute.c/ReadImage/561. 2 convert: no 阅读全文
posted @ 2019-11-13 17:51 andy_chan 阅读(483) 评论(0) 推荐(0)
摘要:本文整理自大神 Corz 1、php56 2、php72 3、test 4、后续修正 阅读全文
posted @ 2019-01-26 09:55 andy_chan 阅读(1800) 评论(0) 推荐(0)
摘要:最开始想使用 pdo_sqlsrv 拓展,但是一直没成功,本文采用的是 pdo_dblib + freetds。 环境:CentOS 6.8、PHP 5.6.20 freetds pdo_dblib 测试代码 另外,我这边用的是 php-5.6.20 安装包里自带的拓展包去编译 pdo_dblib, 阅读全文
posted @ 2018-11-29 10:02 andy_chan 阅读(834) 评论(0) 推荐(0)
摘要:代码: 结果: 158==397917763 1==16777215==390611388207==198958881==390611388==1525825==1979574724==124634137==197957472==773271==124127374232==2932959818==1 阅读全文
posted @ 2017-08-16 17:28 andy_chan 阅读(893) 评论(0) 推荐(0)
摘要:从php5.6升级php7.1,报错 方案:如果是自己写了 session 处理类,继承了 SessionHandlerInterface 接口,在 PHP71 中要保证 read 方法,返回的是一个 string,其他类型都会报错。 比如我的情况,在读不到的时候返回的是 false,在以前版本的 阅读全文
posted @ 2017-07-20 09:52 andy_chan 阅读(3212) 评论(0) 推荐(0)
摘要:直接上步骤: 上面第10行是那thinkphp做测试,结果类似: 更多PHPCompatibility相关内容,请参考 https://www.sitepoint.com/quick-intro-phpcompatibility-standard-for-phpcs-are-you-php7-rea 阅读全文
posted @ 2017-05-23 17:11 andy_chan 阅读(1560) 评论(0) 推荐(0)
摘要:测试背景 bg.jpg 测试图片 a.jpg 结果示例 代码demo 阅读全文
posted @ 2017-03-20 20:15 andy_chan 阅读(892) 评论(0) 推荐(1)
摘要:一、服务器分布 1、LVS负载均衡 2、多台danmu server 3、Redis(集群)用于存储数据和夸服务器订阅通知 4、Cli server用于读取缓存数据并存到mysql,以及清空缓存 二、弹幕服务端 1、danmu-server使用swoole_websocket_server,中间是子 阅读全文
posted @ 2017-02-27 20:00 andy_chan 阅读(591) 评论(0) 推荐(0)
摘要:测试代码 测试结果 文档 阅读全文
posted @ 2016-12-30 14:31 andy_chan 阅读(2275) 评论(0) 推荐(0)
摘要:转自: http://blog.csdn.net/cdy102688/article/details/21395835 阅读全文
posted @ 2016-11-24 12:51 andy_chan 阅读(4248) 评论(0) 推荐(0)
摘要:近期项目需要在聊天的基础上新增红包功能,需求:仿微信(不含留言),但只能使用余额发红包。于是多次使用微信红包,了解各种交互界面及业务需求,如展示信息、分类(个人,群普通,群拼手气)、个数限制(100)、金额限制(200)、过期时间(24小时)等等,然后着手开发,下面提及的基本全是提供给app端的接口 阅读全文
posted @ 2016-10-30 16:01 andy_chan 阅读(4802) 评论(6) 推荐(4)
摘要:1 <?php 2 header("Content-type:text/csv;charset=utf-8"); 3 header("Content-Disposition:attachment;filename=aa.csv"); 4 header('Cache-Control:must-revalidate,post-check=0,pre-check=0'); 5 header('Expi... 阅读全文
posted @ 2016-09-24 14:35 andy_chan 阅读(4127) 评论(0) 推荐(0)
摘要:零、resource http://pan.baidu.com/s/1o83r3S2 一、centos 6.4、VirtualBox 5.0.14 二、nginx 1.9.9 安装 [root@pc ~]# cd /usr/local/src/ [root@pc src]# yum install 阅读全文
posted @ 2016-05-17 22:56 andy_chan 阅读(1294) 评论(0) 推荐(0)
摘要:一、场景: 系统 Deepin 15;php 5.5.33;nginx 1.9.9 二、状况: 简单的页面输出正常(比如 phpinfo();),跑公司的任何一个项目,均502 三、排查 1、查询各种日志,包括 nginx.error.log、php_error.log、php-fpm.error. 阅读全文
posted @ 2016-03-22 20:38 andy_chan 阅读(2831) 评论(1) 推荐(2)