示例#1
0
文件: ajax.php 项目: karimo255/myblog
 public function createCaptcha()
 {
     if (!$this->checkRequest()) {
         return false;
     }
     require_once 'lib/form/captcha.php';
     $captcha = new \captcha();
     $this->response->addHeader('Content-Type: application/json');
     $this->response->setOutput(json_encode(['src' => $captcha->png(), 'code' => $captcha->getCode()]));
 }