评价等级:优秀
其中要替换的代码
$accessKeyId = “你的KeyId “;
$accessKeySecret = “你的KeySecret”;
调用发送知信方法
$mes = new \app\api\controller\Message;
$mobile 收信人手机号
$code 你要发送的验证码
$sign 阿里短信签名
$tp 阿里短信的模版
发送方法
$mes->sendSms($mobile,$code,$sign,$tp);
demo源码