生成验证码使用GD
static public verifycode_gd ( $img_width = 80, $img_height = 30 ) : array | ||
$img_width | ||
$img_height | ||
return | array |
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(); }