1、在wemall三级分销微商城源码的相应位置,进行修改
2、/***发送短信接口*@param$user*@param$pass*@param$content*@param$phone*@retur荏鱿胫协nmixed发送回调*/functionsendSms($user,$pass,$content,$phone){$statusStr=array("0"=>"短信发送成功","-1"=>"参数不全","-2"=>"服务器空间不支持,请确认支持curl或者fsocket,联系您的空间商解决或者更换空间!","30"=>"密码错误","40"=>"账号不存在","41"=>"余额不足","42"=>"帐户已过期","43"=>"IP地址限制","50"=>"内容含有敏感词");$smsapi="http://www.smsbao.com/";//短信网关$user=$user;//短信平台帐号$pass=md5($pass);//短信平台密码$content=$content;//要发送的短信内容$phone=$phone;$sendurl=$smsapi."sms?u=".$user."&p=".$pass."&m=".$phone."&c=".urlencode($content);$result=file_get_contents($sendurl);return$statusStr[$result];}/***@param$user*@param$pass*@param$phone**发送短信验证码*/functionsendSmsVerify($user,$pass,$phone){$code=rand(1000,9999);session("smsVerify",$code);$config=D("Config")->get();$content="[".$config["name"]."],您的验证码是:".$code;//要发送的短信内容sendSms($user,$pass,$content,$phone);}
3、如图所示,手动加上,在需要的地方直接调用就可以了