Skip to content

Commit 4bdb7ad

Browse files
committed
适配php8
1 parent eccd312 commit 4bdb7ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ $Code = $VCode->DrawCode('MyCode'); // x2 ->drawCode
121121

122122
生成好验证码后结果是一个`Result`类,可以使用`getImageBody`获取验证码的图片内容,使用`getImageStr`获得验证码字符,`getMineType`获得验证码的Mine信息
123123

124-
### EasySwoole中
124+
### EasySwoole
125+
126+
在控制器中输出
127+
125128
```
129+
$this->response()->withHeader("Content-Type",$code->getImageMime());
130+
$this->response()->write($code->getImageByte());
126131
```

0 commit comments

Comments
 (0)