![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php
有衡
这个作者很懒,什么都没留下…
展开
-
ThinkPHP6中使用GatewayWorker
ThinkPHP6中使用GatewayWorker原创 2024-02-21 13:09:24 · 1395 阅读 · 0 评论 -
thinkphp 数据库迁移文件的`decimal`小数点怎么表示
thinkphp 数据库迁移文件的`decimal`小数点怎么表示原创 2023-06-25 15:15:56 · 310 阅读 · 0 评论 -
topthink/think-orm 操作数据库自增或者自减
$num = 1//自增$result = Db::name('user')->where('name',$name)->inc('num',$num)->update()//自减$result = Db::name('user')->where('name',$name)->dec('num',$num)->update()原创 2022-01-03 14:34:05 · 619 阅读 · 0 评论 -
EwoMail 登录时显示域不允许
搭建好EwoMail邮局之后,添加了账号后发现邮局登录时弹窗域不允许解决办法:在/etc/hosts这个文件里加入以下内容127.0.0.1 VM_0_17_centos VM_0_17_centos127.0.0.1 localhost.localdomain localhost127.0.0.1 localhost4.localdomain4 localhost4127.0.0.1 localhost localhost.localdomain localhost4 localhost4.原创 2020-11-16 17:45:46 · 8575 阅读 · 6 评论 -
PHPstorm 线下实时代码同步到服务器
我们在开发的时候,代码要部署到线上,部署代码后如果有更新的话,比较麻烦,如果只有一两处更新还好一些,如果有很多地方需要更新就挺痛苦的,今天就讲其中一种方法可以实时同步代码到服务器,使用PHPstorm链接ssh在PHPstorm中创建一个项目选择倒数第二个就可以3. 填写项目名称和本地代码路径,配置选择custom4. 选择Always5. 如果没有配置过就添加一个连接,或者连接其他的6. 填写项目名 选择连接 添加ssh7. 连接ssh8. ssh连接成功9. 连接好原创 2020-09-23 14:20:40 · 505 阅读 · 0 评论 -
支付宝H5开发 The each() function is deprecated. This message will be suppressed on further calls
在开发支付宝H5支付的时候,遇到这个问题The each() function is deprecated. This message will be suppressed on further calls其实就是因为PHP7.2将each()方法废除了,项目中有用到each()就会报这个错,切换PHP版本7.2以下就行...原创 2020-09-11 19:13:01 · 570 阅读 · 0 评论 -
Installation failed, reverting ./composer.json to its original content.
今天在使用composer下载think-api的时候一直报错Installation failed, reverting ./composer.json to its original content.刚开始以为是要改下载源改了阿里的源composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/还是不行,找了挺久后来发现可能是php版本的问题,之前用的是7.0的然后我改成7.3的再用compo原创 2020-08-31 18:27:50 · 440 阅读 · 0 评论 -
php curl爬取页面
简单的爬取页面//初始化$curl = curl_init("http://baidu.com");//创建curl资源curl_exec($curl);//关闭curl并释放资源curl_close($curl);调用webService获取天气//调用webService获取天气header("Content-Type:text/html; charset=ut...原创 2020-04-11 15:31:58 · 307 阅读 · 0 评论 -
移动梦网接入短信
官网地址:http://www.monyun.cn/注册一个账号我是用api的接入方式,官方推荐用SDK,但是用SDK的方式接入需要给PHP装pthreads这个扩展,要用多线程,试过挺多次,一直没有装成功过文档地址:http://con.monyun.cn:9960/developer_Center/index.html?htmlURL1=API&htmlURL2=APIone...原创 2020-03-23 11:31:10 · 623 阅读 · 0 评论 -
阿里云IP归属地接口
用tp5写的接口我用的是这个:https://market.aliyun.com/products/57002002/cmapi00035184.html?spm=5176.10695662.1996646101.searchclickresult.549c173dYGx2YO#sku=yuncode2918400001public function chat() { //t...原创 2020-03-18 16:37:58 · 186 阅读 · 0 评论 -
阿里云号码认证服务服务端PHP版
TP5.1写的api官方接入说明:https://github.com/aliyun/openapi-sdk-php/blob/master/README-zh-CN.md?spm=a2c4g.11186623.2.13.267a16e4QkHp9N&file=README-zh-CN.md客户端对接好之后,发送请求到服务端composer下载PHP版sdkcomposer req...原创 2020-03-18 15:53:10 · 1030 阅读 · 0 评论 -
阿里云短信服务接入
阿里云短信服务接入文档地址:https://help.aliyun.com/document_detail/61994.html?spm=a2c4g.11186623.6.674.5f03157bV4QV8ESDK下载地址:https://help.aliyun.com/document_detail/55359.html?spm=a2c4g.11186623.4.3.7b464e6a...原创 2020-03-13 19:19:40 · 258 阅读 · 0 评论 -
将二位数组的相同下标的内容组成一个新的数组
将一个二位数组的相同下标的内容组成一个新的数组//这个里面放二维数组$arr = [];//定义一个空数组$arr_new = array();foreach($arr as $item){ foreach($item as $key=>$val){ $arr_new[$key][] = $val; }}$arr = $arr_new;var_...原创 2020-03-12 18:46:11 · 591 阅读 · 0 评论 -
error_reporting() 设置 PHP 的报错级别
error_reporting() 设置 PHP 的报错级别并返回当前级别错误报告是按位的。或者将数字加起来得到想要的错误报告等级E_ALL //所有的错误和警告E_ERROR //致命性运行时错E_WARNING //运行时警告(非致命性错)E_PARSE //编译时解析错误E_NOTICE //运行时提醒(这些经常是是你的代码的bug引起的,也可能是有意的行为造成的。(如...原创 2020-02-04 18:24:40 · 219 阅读 · 0 评论 -
php 开启 sockets 扩展
1 .打开php.ini2 .ctrl+f 打开搜索 sockets3 .将extension=sockets前面的;去掉4 .保存重启PHP原创 2020-02-04 13:49:33 · 1744 阅读 · 0 评论 -
cmd php 命令
php -v 查看PHP版本php -n 查看当前PHP开启了哪些扩展php -n | findstr mysql 查看当前PHP开启哪些mysql扩展php -n | grep socket 查看当前PHP开启了socket扩展(这个命令在window下面不能执行)...原创 2020-02-04 13:45:20 · 178 阅读 · 0 评论