最新消息:本站所有跳转向bbs.ykit.cn的附件将全面停止,附件已转移到https://www.qingsj.com

wecenter验证码无法识别修改方法

WeCenter 有客 838浏览 0评论

UPLOAD/system/core/captcha.php

		$this->captcha = new Zend_Captcha_Image(array(
			'font' => $this->get_font(),
			'imgdir' => $img_dir,
			'fontsize' => rand(21, 22),
			'width' => 100,
			'height' => 40,
			'wordlen' => 4,
			'session' => new Zend_Session_Namespace(G_COOKIE_PREFIX . '_Captcha'),
			'timeout' => 600
		));
		
		$this->captcha->setDotNoiseLevel(rand(1, 2));     // 这里是设置点干扰和线条干扰,自已调一下
		$this->captcha->setLineNoiseLevel(rand(1, 2));
	}

修改为

$this->captcha = new Zend_Captcha_Image(array(
 'font' => $this->get_font(),
 'imgdir' => $img_dir,
 'fontsize' => rand(20, 22),
 'width' => 100,
 'height' => 40,
 'wordlen' => 4,
 'session' => new Zend_Session_Namespace(G_COOKIE_PREFIX . '_Captcha'),
 'timeout' => 600
 ));

$this->captcha->setDotNoiseLevel(rand(0, 0));
 $this->captcha->setLineNoiseLevel(rand(0, 0));
 }

字体替换到fonts里

下载地址:fonts

转载请注明:有客帮 » wecenter验证码无法识别修改方法

您必须 登录 才能发表评论!