### 产生验证码 ``` 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 } ```