PHPCMS V9 简化验证码修改纯数字验证码
phpcmsv9程序中的验证码文字比较复杂且难以辨认,可以修改以下两个checkcode文件:
phpcms\libs\classes\checkcode.class.phpphpsso_server\phpcms\libs\classes\checkcode.class.php
其实两个文件都一样,一个是在phpcms中使用,一个在phpsso中使用。
1.设置只显示数字
//设置随机生成因子//public $charset ='abcdefghkmnprstuvwyzABCDEFGHKLMNPRSTUVWYZ23456789':public $charset ='0123456789';
2.取消或减少文字倾斜和抖动
//imagettftext($this-> img,$this->font_size,rand(-30,30),$x*$i+rand(0,5), $this-> height/1.4, $this->fon_tcolor,$this-> font,$this->code[$i]);imagettftext($this-> img, $this->font_size, rand(-0,0,) $x*$i+rand(0,0,), $this->heiqht/1.4,$this-> font_color, $this->font,$this->code[$i]);
3.取消图片画线
$this-> creat_font();//$this-> creat_line();$this-> output();