表单提交之前进行短信验证提示系统错误
public function post() { if (IS_POST) { $phone = $_POST['data']['tel']; // 这里需要改 shoujihao $code = \Phpcmf\Service::L('Form')->get_mobile_code($phone); if (!$code) { $this->_json(0, dr_lang('没有发送验证码')); } elseif ($code != $_POST['sms']) { $this->_json(0, dr_lang('验证码不正确')); } } $this->_Home_Post(); }
需要用到插件吗,官方的这个发送短信的可以用来发送验证码吗