- 博客(5)
- 资源 (2)
- 收藏
- 关注
原创 mysql 语句中的in、find_in_set、like的区别
1.in查询相当于多个or条件的叠加,例如: select * from user where user_id in (1,2,3); 等效于select * from user where user_id = 1 or user_id = 2 or user_id = 3; not in与in相反,如select * from user where user_id not in (1,2,3); 等效于select * from user where user_id != 1 and user_id
2020-05-19 14:59:00
580
原创 小程序消息推送token验证PHP代码
/** * 检查配置token */ public function check_server() { //这个echostr呢 只有说验证的时候才会echo 如果是验证过之后这个echostr是不存在的字段了 if($_GET['echostr']){ $echoStr = $_GET["echostr"]; if ($this->checkSignature()) { ob_clean();//防止之前缓存区数据影响 echo $echoStr;
2020-05-19 14:48:38
337
原创 小程序微信支付封装类
//微信支付类 class WeiXinPay{ //=======【基本信息设置】===================================== //微信公众号身份的唯一标识 protected $APPID = appid;//填写您的appid。微信公众平台里的 protected $APPSECRET = secret; //受理商ID,身份标识 protected $MCHID = '11111111';//商户id //商户支付密钥Key protected $KEY = '19
2020-05-19 14:39:50
680
转载 php中的浮点数计算问题
用php的±/计算浮点数的时候,可能会遇到一些计算结果错误的问题,比如echo intval( 0.58100 );会打印57,而不是58,这个其实是计算机底层二进制无法精确表示浮点数的一个bug,是跨语言的,我用python也遇到这个问题。所以基本上大部分语言都提供了精准计算的类库或函数库,比如php有BC高精确度函数库。 例子 $f = 0.58; var_dump(intval($f * 100)); //为啥输出57 为啥输出是57啊? PHP的bug么? 我相信有很多的同学有过这样的疑问,
2020-05-19 14:14:53
206
原创 PHP无限分类生成树方法,引用,非递归
@[TOC]( PHP无限分类生成树方法,引用,非递归 ) 这个是核心方法 function generateTree($items){ tree=array();foreach(tree = array(); foreach(tree=array();foreach(items as KaTeX parse error: Expected '}', got 'EOF' at end of input: … if(isset(items[$item[‘pid’]])){ items[ite
2020-05-19 11:49:29
229
node+socket 实现文件批量上传+断点续传+特效进度nodesocketupload.rar
2019-08-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅