public function show(){ $config=[ 'length'=>2, 'imageH' => 30, // 验证码图片高度 'imageW' => 100, // 验证码图片宽度 'fontSize' => 15, 'useCurve' => false,// 是否画混淆曲线 'useNoise' => false, // 是否添加杂点; ]; $captcha=new Verify($config); $captcha->useZh = true; //在这个目录下新建一个文件夹zhttfs: ThinkPHP/library/think/Verfiy/
//将字体文件从C:WINDOWS/Fonts/simhei.ttf拷贝至此 $captcha->fontttf = 'simhei.ttf'; $captcha->entry(); }