会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
pengcx
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
24
下一页
2020年10月28日
js防止短时间内重复点击
摘要: //重复点击限制 function fn(callback) { fn.prototype.init(callback); } fn.prototype = { canclick: true, init: function (callback) { if (this.canclick) { this
阅读全文
posted @ 2020-10-28 11:11 pengcx
阅读(423)
评论(0)
推荐(0)
2020年10月16日
tp5 where a and (b or c)
摘要: $where = function ($query) use ($map1, $map2) { $query->whereOr(function ($query) use ($map1) { $query->where($map1); })->whereOr(function ($query) us
阅读全文
posted @ 2020-10-16 14:10 pengcx
阅读(318)
评论(0)
推荐(0)
2020年10月14日
array_diff遇到的坑
摘要: 一维数组求差集 key值不能变化 比如 $a = ['01', '12']; $b = ['01', '02', '03', ....,'13'] $c = array_diff($b,$a)); 返回的结果为 array (size=11) 1 => string '02' (length=2)
阅读全文
posted @ 2020-10-14 18:15 pengcx
阅读(258)
评论(0)
推荐(0)
2020年10月9日
前端开发必配置:html5shiv.js和respond.min.js的作用说明!
摘要: 转载 http://www.youhutong.com/index.php/article/index/210.html 一、做页面开发时我们基本都会需要解决的问题: 1、解决ie9以下浏览器对html5新增标签的不识别,并导致CSS不起作用的问题。 2、让不支持css3 Media Query的浏
阅读全文
posted @ 2020-10-09 15:39 pengcx
阅读(435)
评论(0)
推荐(0)
2020年9月9日
phpmailer QQ邮件发送
摘要: 一、phpmailer 安装或者下载方式: 1、从 github 上下载: https://github.com/PHPMailer/PHPMailer/ 2、使用 composer 安装: composer require phpmailer/phpmailer 二、开启QQ相关服务 设置-》账户
阅读全文
posted @ 2020-09-09 17:45 pengcx
阅读(169)
评论(0)
推荐(0)
2020年9月8日
php 系统评分 已知评分总人数,最终评分 粗略规划各等级评分人数
摘要: public function score() { $rateTotal = 25;//总评分人数 $rateScore = 7.5;//最终评分 10分制 $totalScore = intval($rateTotal * $rateScore / 2); //总评分 转化为5分制 $percen
阅读全文
posted @ 2020-09-08 16:07 pengcx
阅读(425)
评论(0)
推荐(0)
2020年9月7日
短时间内,计算连续签到天数
摘要: function sign_count(){ $cur_day = date('Ymd',time()); $arr = [ ['id' => 7, 'sign_time' => '20200907'], ['id' => 6, 'sign_time' => '20200905'], ['id' =
阅读全文
posted @ 2020-09-07 15:55 pengcx
阅读(250)
评论(0)
推荐(0)
2020年8月26日
阻塞和非阻塞举例
摘要:
阅读全文
posted @ 2020-08-26 16:24 pengcx
阅读(146)
评论(0)
推荐(0)
2020年7月9日
nginx设置ip黑名单
摘要: 1、在配置文件目录下如:/usr/local/nginx/conf下创建黑名单文件ip.black(叫啥都行) 在文件内容写上列入黑名单的IP,格式为deny IP; #拒绝访问IP deny xxxxxxx; 2、在nginx.conf进行配置
阅读全文
posted @ 2020-07-09 11:09 pengcx
阅读(3590)
评论(0)
推荐(0)
2020年6月29日
将项目上传到gitee
摘要: 1、在gitee创建项目 2、进入本地项目目录 git init #初始化 git add . #将当前目录加入到git git commit -m "first commit(提交的描述信息)" #git提交到本地版本库 git remote add origin https://gitee.co
阅读全文
posted @ 2020-06-29 11:29 pengcx
阅读(241)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
24
下一页
公告