首页
留言
友情链接
壁纸
更多
关于
Search
1
dockerfile怎么执行shell脚本(利用tail -f /dev/null命令防止container启动后退出)
4,973 阅读
2
channel常见的异常总结
4,263 阅读
3
支付宝支付配置开发流程
1,409 阅读
4
HTTP 协议中的Content-Encoding
1,268 阅读
5
Laravel底层原理(二) —— 契约(Contracts)
942 阅读
PHP
composer
laravel
swoole
Docker
Linux
Go
随笔
mysql
nginx
Search
标签搜索
gopher
Docker
PHP
dockerfile
通道
go
defer
alipay
支付
git
phpstorm
IDEA
web安全
漏洞
socket
Royal
累计撰写
35
篇文章
累计收到
0
条评论
首页
栏目
PHP
composer
laravel
swoole
Docker
Linux
Go
随笔
mysql
nginx
页面
留言
友情链接
壁纸
关于
搜索到
14
篇与
PHP
的结果
2021-06-28
jetbrains全家桶永久激活补丁+激活方法
补丁下载地址 :jetbrains-agent-latest.zip从官网下载最新的phpstorm安装包并安装完成;打开运行软件弹出以下界面选择点击;再将上面的jetbrains-agent-latest.zip文件,直接拖入下面软件界面中;选择激活方式,直接默认就行点击为phpstorm安装;安装成功,是否重启,选择是;此刻不出意外的话,软件已经破解成功并激活了;
2021年06月28日
401 阅读
0 评论
0 点赞
2021-05-20
git环境权限被拒绝(publickey)不匹配的解决办法
在线上环境执行远程仓代码拉取时突然报以下错误:此问题说明两种情况:1.大概率是秘钥设置不对的问题2.线上环境没生成SSH key怎么解决此问题?第一步:首先查看是否存在SSH key执行命令ls -al ~/.ssh上图说明没有生成SSH key自然也不会匹配成功,怎么生成SSH key第二步:生成SSH key在终端输入 ssh-keygen -t rsa -C "git邮箱账号"上图说明已经更新完成了SSH key第三步:配对git代码仓复制公钥(如果问题是不匹配可以忽略前两步)执行命令cat ~/.ssh/id_rsa.pub 打印出SSH key的公钥(注意是公钥)第四步:设置git把上一步复制出来的公钥添加到git设置中点击保存即可重新git pull 尝试更新代码问题已解决,输入git密码即可同步更新代码。
2021年05月20日
498 阅读
0 评论
0 点赞
2021-05-14
支付宝支付配置开发流程
进入支付宝商家中心 https://b.alipay.com/index2.htm点击产品中心 找到网站支付,进行申请接入支付,如果已经开通请跳过进入支付宝商家开发者中心 https://openhome.alipay.com/platform/developerIndex.htm点击创建应用输入应用名称上传应用图标创建好应用后进去配置阶段,点击下图中的设置,进入接口加密设置,这里需要验证短信验证完短信进入加签管理界面下载 [支付宝密钥生成器]进行安装 https://opendocs.alipay.com/open/291/105971打开[支付宝开放平台开发助手],勾选以下选项,点击生成生成好的密钥如下图,注意不要关闭当前页面复制应用公钥填写在 7 图中的 [填写公钥字符]这一栏,点击保存设置配置接口访问白名单,验证短信完后如下图 , 勾选 配置全量接口填写自己服务器的ip地址进去保存在支付宝开发者中当前得应用中查看支付宝公钥并复制APPID绑定如何查看APPID提交审核应用功能添加19.目前拿到了三个参数:分别是1.应用appid,2.蚂蚁金服key 图11中的应用私钥,3.蚂蚁金服公钥 图14中得到支付宝公钥20.下载sdk配置三个参数 即可完成支付宝调用。21.支付下单代码如下/** * alipay.trade.wap.pay * @param $builder 业务参数,使用buildmodel中的对象生成。 * @param $return_url 同步跳转地址,公网可访问 * @param $notify_url 异步通知地址,公网可以访问 * @return $response 支付宝返回的信息 */ function wapPay($builder,$return_url,$notify_url) { $biz_content=$builder->getBizContent(); //打印业务参数 $this->writeLog($biz_content); $request = new AlipayTradeWapPayRequest(); $request->setNotifyUrl($notify_url); $request->setReturnUrl($return_url); $request->setBizContent ( $biz_content ); // 首先调用支付api $response = $this->aopclientRequestExecute ($request,true); // $response = $response->alipay_trade_wap_pay_response; return $response; } function aopclientRequestExecute($request,$ispage=false) { $aop = new AopClient (); $aop->gatewayUrl = $this->gateway_url; $aop->appId = $this->appid; $aop->rsaPrivateKey = $this->private_key; $aop->alipayrsaPublicKey = $this->alipay_public_key; $aop->apiVersion ="1.0"; $aop->postCharset = $this->charset; $aop->format= $this->format; $aop->signType=$this->signtype; // 开启页面信息输出 $aop->debugInfo=true; if($ispage) { $result = $aop->pageExecute($request,"post"); echo $result; } else { $result = $aop->Execute($request); } //打开后,将报文写入log文件 $this->writeLog("response: ".var_export($result,true)); return $result; } /* 页面提交执行方法 @param:跳转类接口的request; $httpmethod 提交方式。两个值可选:post、get @return:构建好的、签名后的最终跳转URL(GET)或String形式的form(POST) auther:笙默 */ public function pageExecute($request,$httpmethod = "POST") { $this->setupCharsets($request); if (strcasecmp($this->fileCharset, $this->postCharset)) { // writeLog("本地文件字符集编码与表单提交编码不一致,请务必设置成一样,属性名分别为postCharset!"); throw new Exception("文件编码:[" . $this->fileCharset . "] 与表单提交编码:[" . $this->postCharset . "]两者不一致!"); } $iv=null; if(!$this->checkEmpty($request->getApiVersion())){ $iv=$request->getApiVersion(); }else{ $iv=$this->apiVersion; } //组装系统参数 $sysParams["app_id"] = $this->appId; $sysParams["version"] = $iv; $sysParams["format"] = $this->format; $sysParams["sign_type"] = $this->signType; $sysParams["method"] = $request->getApiMethodName(); $sysParams["timestamp"] = date("Y-m-d H:i:s"); $sysParams["alipay_sdk"] = $this->alipaySdkVersion; $sysParams["terminal_type"] = $request->getTerminalType(); $sysParams["terminal_info"] = $request->getTerminalInfo(); $sysParams["prod_code"] = $request->getProdCode(); $sysParams["notify_url"] = $request->getNotifyUrl(); $sysParams["return_url"] = $request->getReturnUrl(); $sysParams["charset"] = $this->postCharset; //获取业务参数 $apiParams = $request->getApiParas(); if (method_exists($request,"getNeedEncrypt") &&$request->getNeedEncrypt()){ $sysParams["encrypt_type"] = $this->encryptType; if ($this->checkEmpty($apiParams['biz_content'])) { throw new Exception(" api request Fail! The reason : encrypt request is not supperted!"); } if ($this->checkEmpty($this->encryptKey) || $this->checkEmpty($this->encryptType)) { throw new Exception(" encryptType and encryptKey must not null! "); } if ("AES" != $this->encryptType) { throw new Exception("加密类型只支持AES"); } // 执行加密 $enCryptContent = encrypt($apiParams['biz_content'], $this->encryptKey); $apiParams['biz_content'] = $enCryptContent; } //print_r($apiParams); $totalParams = array_merge($apiParams, $sysParams); //待签名字符串 $preSignStr = $this->getSignContent($totalParams); //签名 $totalParams["sign"] = $this->generateSign($totalParams, $this->signType); if ("GET" == strtoupper($httpmethod)) { //value做urlencode $preString=$this->getSignContentUrlencode($totalParams); //拼接GET请求串 $requestUrl = $this->gatewayUrl."?".$preString; return $requestUrl; } else { //拼接表单字符串 return $this->buildRequestForm($totalParams); } }
2021年05月14日
1,409 阅读
0 评论
3 点赞
2021-04-22
如何制作并发布自己的 Composer 包
注册 Github 账号(https://github.com)注册 Packagist 账号(https://packagist.org)php代码(可以是项目或者类库等)
2021年04月22日
194 阅读
0 评论
0 点赞
1
2
3