上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页
摘要: php生成九宫格图片 <?php /** * 生成群组九宫格头像 * param $pic_list array 群主和前八个群成员的头像(图片地址的数组) * param $group_id int 群组id,用于生成头像名字 */ function set_img($pic_list, $gro 阅读全文
posted @ 2020-05-21 17:25 MargoHu 阅读(748) 评论(0) 推荐(1) 编辑
摘要: PHP实现时间格式转换,获取友好的时间显示 1.函数gmstrftime(); <?php /** * 时间友好显示 * @param int $time 时间戳 * @return string 友好时间字符串 * @author zhouzy */ function get_friendly_t 阅读全文
posted @ 2020-05-21 17:18 MargoHu 阅读(340) 评论(0) 推荐(0) 编辑
摘要: <?php /** * 精确加法 * @param [type] $a [description] * @param [type] $b [description] */ function math_add($a,$b,$scale = '2') { return bcadd($a,$b,$scal 阅读全文
posted @ 2020-05-15 00:02 MargoHu 阅读(3920) 评论(0) 推荐(0) 编辑
摘要: PHP查看在主机禁用的函数 <?php header("content-Type: text/html; charset=utf-8"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); 阅读全文
posted @ 2020-05-13 00:20 MargoHu 阅读(683) 评论(0) 推荐(0) 编辑
摘要: php计算持续时长 <?php /** * 计算持续时长 * * @param int $second 秒数 * @return string $duration 5天10小时43分钟40秒 */ function secondTime($seconds=0){ $duration = ''; $s 阅读全文
posted @ 2020-05-12 16:14 MargoHu 阅读(966) 评论(0) 推荐(0) 编辑
摘要: PHP获取毫秒时间戳 <?php /** * 返回当前的毫秒时间戳 * @return string */ function msectime() { list($tmp1, $tmp2) = explode(' ', microtime()); return sprintf('%.0f', (fl 阅读全文
posted @ 2020-05-12 00:18 MargoHu 阅读(361) 评论(0) 推荐(0) 编辑
摘要: php扩展 swoole的安装与使用 https://blog.csdn.net/nuli888/article/details/51849699 https://www.jianshu.com/p/462013f18177 swoole 安装用的是centOSphp安装目录:/usr/local/ 阅读全文
posted @ 2020-05-10 23:40 MargoHu 阅读(385) 评论(0) 推荐(0) 编辑
摘要: <?php public function task() { $list = M('SysTask')->where(['status' => ['neq',3]])->select(); // 通过文件锁住操作执行完再执行下一个 $fp = fopen("lock.txt", "w+"); if 阅读全文
posted @ 2020-05-10 23:38 MargoHu 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 1.先确保redis进程存活ps -ef|grep redis 12.执行./redis-cli或者./redis-cli -h 127.0.0.1 -p 6379[root@slave bin]# /bin/redis-cli 13.执行dbsize命令127.0.0.1:6379> dbsize 阅读全文
posted @ 2020-05-10 00:34 MargoHu 阅读(10371) 评论(0) 推荐(0) 编辑
摘要: NGINX设置http强制跳转https 方法一: 打开nginx.conf或虚拟机配置文件 server { listen 80; server_name dev.wangshibo.com; index index.html index.php index.htm; access_log /us 阅读全文
posted @ 2020-05-09 16:06 MargoHu 阅读(1611) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页