yii2 阿里云 短信服务 aliyun_dysms [ 2.0 版本 ]

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了yii2 阿里云 短信服务 aliyun_dysms [ 2.0 版本 ]脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

安装

      
      
1
      
      
composer require "saviorlv/yii2-dysms:dev-master"@H_403_22@
      
      
1
2
3
4
5
      
      
{
"require"@H_403_22@: {
"saviorlv/yii2-dysms"@H_403_22@: "dev-master"@H_403_22@
}
}

设置方法

全局使用

      
      
1
2
3
4
5
6
7
8
9
10
11
      
      
$response@H_403_22@ = Yii:: $app@H_403_22@->aliyun->sendSms(
"孙坤峰"@H_403_22@,// 短信签名
"SMS_76350132"@H_403_22@,// 短信模板编号
"13673715134"@H_403_22@,// 短信接收者
Array( // 短信模板中字段的值
"code"@H_403_22@=> "12345"@H_403_22@,
"PRoduct"@H_403_22@=> "dsd"@H_403_22@
),
"123"@H_403_22@
);
print_r( $response@H_403_22@);

Yii2专属 新的链接地址
通用包 新的链接地址

原文:大专栏  yii2 阿里云 短信服务 aliyun_dysms [ 2.0 版本 ]

脚本宝典总结

以上是脚本宝典为你收集整理的yii2 阿里云 短信服务 aliyun_dysms [ 2.0 版本 ]全部内容,希望文章能够帮你解决yii2 阿里云 短信服务 aliyun_dysms [ 2.0 版本 ]所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。