04 2021 档案
摘要:列子: [{"id":342},{"id":343},{"id":344}] 代码: $arr = ['reminders_status' => 1]; array_walk($isOverdue, function (&$value, $key, $arr) { $value = array_me
阅读全文
摘要:需要大写V
阅读全文
摘要:修改控制器后,会出现30秒的延迟,才能生效。这个不是thinkphp框架的问题,是PHP7.x的问题,关闭opchche就行。找到php.ini下的opchche拓展: opcache.enable = 1 1
阅读全文
摘要:https://www.cnblogs.com/linxingyun/p/6772937.html 问题: react+axios对不同server上的tomcat服务器进行跨域访问,即使只进行一次请求,server端收到两次请求,而且两次请求的消息体不一样,一次带鉴权信息,一次不带。 原因: 跨域
阅读全文
摘要:在router.php开头直接加入header('Access-Control-Allow-Origin: *');header("Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept");header
阅读全文
摘要:// 获取本月第一天和下月第一天 function getMonth($date) { $firstday = date("Y-m-01", strtotime($date)); $lastday = getNextMonthDays($firstday); return array($firstd
阅读全文
摘要:腾讯位置服务文档链接 https://lbs.qq.com/service/webService/webServiceGuide/webServiceOverview 先根据文档申请密钥获取到key 到控制台先创建好应用 然后添加key key名称,描述随便填写 特别注意几点: 小程序:勾选WebS
阅读全文
摘要:isset 判断变量是否已存在 empty 判断变量是否为空或为0 is_null 判断变量是否为NULL 变量emptyis_nullisset $a=”” true false true $a=null true true false var $a true true false $a=arra
阅读全文
摘要:转自(https://www.kancloud.cn/manual/thinkphp5_1/354029) 时间比较 使用where方法 where方法支持时间比较,例如: // 大于某个时间 where('create_time', '> time', '2016-1-1'); // 小于某个时间
阅读全文

浙公网安备 33010602011771号