当前位置:网站首页>Tp6 Alibaba Cloud SMS Window message Curl Error 60: SSL Certificate Problem: Unable to get local issuer Certificate
Tp6 Alibaba Cloud SMS Window message Curl Error 60: SSL Certificate Problem: Unable to get local issuer Certificate
2022-04-23 02:07:00 【Yixi MUZE】
Préface:Aider le client à recevoir un rappel de code de vérification de SMS d'Alibaba Cloud,Nouvelle édition deSDK,Un instant.,La torture est simple.,InWindowsJ'ai failli mourir.,J'ai failli me douter de moi.,C'est bon,Fin du travail
Code:
// Alicloud SMS
public static function createClient($accessKeyId, $accessKeySecret){
$config = new Config([
"accessKeyId" => $accessKeyId,
"accessKeySecret" => $accessKeySecret
]);
// Nom de domaine visité
$config -> endpoint = "dysmsapi.aliyuncs.com";
return new Dysmsapi($config);
}
public static function smsTemp($mobile,$code){
$client = self::createClient(SMS_ID,SMS_SECRET);
$sendSmsRequest = new SendSmsRequest([
"signName" => SIGN_NAME,
"templateCode" => SMS_CODE,
"phoneNumbers" => $mobile,
"templateParam" => "{\"code\":\"$code\"}"
]);
// Veuillez imprimer le Code de copie en cours d'exécution. API Valeur de retour de
return $client->sendSms($sendSmsRequest);
}
// Tests API
public function test($mobile,$code){
$res = self::smsTemp($mobile,$code);
if($res->body->code == "OK") {
return "success";
}
return 'fail';
}
CACertificat, Utilisé pour appeler HTTPSQuand les ressources, Vérifier si le site Web de l'autre partie est CA Certificat délivré , Au lieu d'être auto - généré ;
1、Téléchargement requisCACertificat L'adresse du fichier est http://curl.haxx.se/ca/cacert.pem
2、 Mets - le là. phpSous la table des matières,Et dansphp.ini Dans curl.cainfo Ajouter un chemin après :
curl.cainfo="D:\php\cacert.pem"
版权声明
本文为[Yixi MUZE]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230207164932.html
边栏推荐
- Is CICC fortune a company with CICC? Is it safe
- Quel est le fichier makefile?
- 2022.4.10-----leetcode. eight hundred and four
- BGP服务器在什么业务场景会被用到?
- PID refinement
- Startup of openstack service
- 用TensorFlow实现线性回归(包括过程中出现的问题及解决方法)
- 关于局域网浅谈
- Common formatting problems after word writing
- 【dpdk】10. Dpdk DNS learning notes
猜你喜欢

What business scenarios will the BGP server be used in?

都是做全屋智能的,Aqara和HomeKit到底有什么不同?

World Book Day 𞓜 a good book that technicians should not miss (it cutting-edge technology)

Leetcode46 Full Permutation

RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimensio

Esp32 message queue using FreeRTOS

005_redis_set集合

What should I pay attention to when using proxy IP?

Easyswool environment configuration

What problems will you encounter when dialing VPS?
随机推荐
Lane cross domain problem
2022.4.22-----leetcode. three hundred and ninety-six
Halo open source project learning (I): project launch
使用代理IP是需要注意什么?
Uncover floating-point operations hidden by the ARM compiler
浅析静态代理ip的三大作用。
openstack 服务的启动
Unity editor hierarchy drop-down menu extension
Chinese scientists reveal a new mechanism for breaking through the bottleneck of rice yield
EBS:PO_EMPLOYEE_HIERARCHIES_ALL
What categories do you need to know before using proxy IP?
easyswoole环境配置
浅析一下隧道代理IP的优缺点。
JDBC cannot connect to MySQL, and the error is access denied for user 'root' @ '* * *' (using password: Yes)
Easyswool environment configuration
ThinkPHP kernel development blind box mall source code v2 0 docking easy payment / Alibaba cloud SMS / qiniu cloud storage
App optimization and advanced scoreboard Part 2 [Mui + flask + mongodb]
2018 China Collegiate Programming Contest - Guilin Site J. stone game
校园转转二手市场源码
OJ daily practice - Finish