会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
zlf2000
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2022年6月30日
php 常用bc函数
摘要: bcadd — 加法,2个任意精度数字的加法计算bcsub — 减法bcmul — 乘法bcdiv — 除法bcpow — 乘方bcmod — 取模bcsqrt — 求二次方根bccomp — 比较两个任意精度的数字,返回一个整数的结果:若两数相等返回0,左数大返回1,否则返回-1bcpowmod
阅读全文
posted @ 2022-06-30 14:48 zlf2000
阅读(2070)
评论(0)
推荐(0)
2022年6月29日
php获取前一天,前一个月,前半年,前一年的时间戳
摘要: #获取前一小时strtotime("-1 hour") #获取前一天strtotime("-1 day") #获取前一周strtotime("-1 week") #获取前一个月strtotime("-1 month") #获取前半年strtotime("-6 month") #获取前一年strtot
阅读全文
posted @ 2022-06-29 16:59 zlf2000
阅读(264)
评论(0)
推荐(0)
thinkphp mysql 使用IN 条件
摘要: 今天使用thinkphp whrere in条件查询 数据库是 ,我需要搜索入参 110000 一个字段 ,但是thinkphp 为了效率直接把 in条件转成 = 解决方法 FIND_IN_SET(:id,item.area)', ['id' => xx] FIND_IN_SET(防注入使用占位符,
阅读全文
posted @ 2022-06-29 16:59 zlf2000
阅读(710)
评论(0)
推荐(0)
2022年5月25日
html input 是否允许浏览器字段默认值 或者之前输入的值
摘要: autocomplete 属性是 HTML5 中的新属性,在input中autocomplete属性是默认开启的。 1、定义:autocomplete属性规范表单是否启用自动完成功能。自动完成允许浏览器对字段的输入,是基于之前输入过的值。 2、应用范围:autocomplete适用<form>,以及
阅读全文
posted @ 2022-05-25 14:47 zlf2000
阅读(136)
评论(0)
推荐(0)
2022年5月16日
git 更新和强制更新失败
摘要: Your local changes to the following files would be overwritten by mergeerror: Your local changes to the following files would be overwritten by merge:
阅读全文
posted @ 2022-05-16 08:44 zlf2000
阅读(478)
评论(0)
推荐(0)
2022年2月22日
php 二维数组转成一维数组
摘要: // 1 $c = call_user_func('array_merge', $reds);// 2 $c = array_merge(...$reds);// 3 array_map(function ($v) use (&$c) { $c[array_keys($v)[0]] = array_
阅读全文
posted @ 2022-02-22 18:43 zlf2000
阅读(121)
评论(0)
推荐(0)
2021年5月12日
php 微信小程序转义403
摘要: function code 微信 iv 偶现 encryptedData 41003 encodeURIComponent 关于小程序微信授权登录提示41003 文章简介 原因一(iv和encryptedData转码问题) 原因二(wx.login()获取code顺序问题) 结尾 文章简介 之前做项
阅读全文
posted @ 2021-05-12 09:06 zlf2000
阅读(133)
评论(0)
推荐(0)
2021年3月9日
根据首字母进行排序
摘要: public function getList($data,$user) { $list = \app\common\model\ChinaArea::getCityList(); $province = \app\common\model\ChinaArea::where("level",1)->
阅读全文
posted @ 2021-03-09 10:13 zlf2000
阅读(170)
评论(0)
推荐(0)
2021年3月5日
PHP中的精确计算bcadd,bcsub,bcmul,bcdiv 及 扩展安装
摘要: <?php/** * 精确加法 * @param [type] $a [description] * @param [type] $b [description] */function math_add($a,$b,$scale = '2') { return bcadd($a,$b,$scale)
阅读全文
posted @ 2021-03-05 14:44 zlf2000
阅读(345)
评论(0)
推荐(0)
2021年1月30日
php 设置友好时间
摘要: public static function formatTime($time){ if (is_int($time)) { $time = intval($time); } elseif ($time instanceof Carbon) { $time = intval(strtotime($t
阅读全文
posted @ 2021-01-30 19:41 zlf2000
阅读(105)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告