



短信需在服务商平台添加模板后才可发送成功.
某些平台API无需填写模板id,留空即可.
发送短信
$config['hash']='timecode';//对应的短信标识$config['data']=array('code'=>'123456','time'=>'2');//替换短信内容参数$config['mobile']='13888888888';//手机号码,多个号码使用;分隔$config['sender']='';//指定发送短信的接口 如:sms_aliyun,不指定则按现有的接口依次发送,$config['task']=false;//是否使用队列发送,默认按后台设置发送$config['nolimit']=false;//是否依据后台设置限制发送频率,默认为限制C('sms:send',$config);
验证码
//发送$code=C('sms:code:send','13888888888');//判断C('sms:code:check','13888888888','123123');//删除,完成操作后需删除验证码,防止被再次使用C('sms:code:del','13888888888');
希望以上内容对你有所帮助!如果还有其他问题,请随时提问。 各类知识收集 拥有多年CMS企业建站经验,对 iCMS, LeCMS, ClassCMS, Fastadmin, PbootCMS, PHPCMS, 易优CMS, YzmCMS, 讯睿CMS, 极致CMS, Wordpress, HkCMS, YznCMS, WellCMS, ThinkCMF, 等各类cms的相互转化,程序开发,网站制作,bug修复,程序杀毒,插件定制都可以提供最佳解决方案。