function vcode() { $this->session->start(); $this->http->header('Content-Type', 'image/jpeg'); $verifyCode = Swoole\Image::verifycode_chinese('/usr/share/fonts/truetype/wqy/wqy-microhei.ttc'); // debug($verifyCode); // $verifyCode = Swoole\Image::verifycode_gd(); // $verifyCode = Swoole\Image::verifycode_imagick(); $_SESSION['vcode'] = $verifyCode['code']; return $verifyCode['image']; }
function vcode() { $this->session->start(); $this->http->header('Content-Type', 'image/jpeg'); Swoole\Image::verifycode_gd(); }
function verify() { session(); $this->swoole->http->header('Content-Type', 'image/png'); Swoole\Image::verifycode_gd(); }