样式 ![](https://box.kancloud.cn/ef086afbed3cd8ad2440aa68741f9125_478x112.png =200x) ### 产生验证码 ``` public function captcha($id = '') { $captcha = new Captcha(); $captcha->send($id); } ``` ### 检查验证码 ``` public function check($code, $id = '') { $captcha = new Captcha(); $b = $captcha->check($code, $id); if(!$b){ exception('验证码填写错误'); } //GO } ```