php
单筱风
2021年毕业软件工程专业
展开
-
php查询mysql数据库某一天或某个月
1.某个月SELECT * FROM `table` WHERE FROM_UNIXTIME(add_time,'%Y-%m')='2020-07'; $list = $this->model ->where($where) ->where('FROM_UNIXTIME(add_time,"%Y-%m")="'.$_GET['time'].'"') ->o原创 2020-08-11 21:50:43 · 746 阅读 · 0 评论 -
解决composer install遇到:No lock file found.。。 Your requirements could not be resolved to an installable
1.错误提示No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.Loading composer repositories with package informationUpdating dependenciesYour requirements原创 2020-08-01 12:20:13 · 12029 阅读 · 3 评论 -
thinkphp5.1+uni-app接口开发中跨域问题解决方案
1. 什么是 CORSCORS(Cross-Origin Resource Sharing 跨源资源共享),当一个请求 url 的协议、域名、端口三者之间任意一与当前页面地址不同即为跨域。2. 解决方法一般而言,只需要加入以下三行代码即可解决//指定允许其他域名访问header(‘Access-Control-Allow-Origin:’);//响应类型header('Access-Control-Allow-Methods:’);//响应头设置header(‘Access-Contro原创 2020-07-18 17:00:19 · 1127 阅读 · 0 评论