设置织梦dedecms的验证安全设置>验证码字符数:超过或小于4都是无效的,需要手动修改include/vdimgck.php文件的源代码。方法如下:
修改以下红色部分即可,无效请留言^_^,还有记得了类型不能选择但单词,和验证码图片长度需要根据长度修改;该文为原创内容,转载注明,谢谢!
$config = array(
'codelen' => (int)$safe_codelen,
'font_size' => 14,
'img_height' => $safe_wheight,
'word_type' => (int)$safe_codetype, // 1:数字 2:英文 3:单词
'img_width' => $safe_wwidth,
'use_boder' => TRUE,
'font_file' => dirname(__FILE__).'/data/fonts/ggbi.ttf',
'wordlist_file' => dirname(__FILE__).'/data/words/words.txt',
'filter_type' => 5);
//主要参数
$codelen = isset($config['codelen']) ? $config['codelen'] : 4;
$font_size = isset($config['font_size']) ? $config['font_size'] : 14;
$img_height = isset($config['img_height']) ? $config['img_height'] : 24;
$img_width = isset($config['img_width']) ? $config['img_width'] : 68;
$font_file = isset($config['font_file']) ? $config['font_file'] : PATH_DATA.'/data/font/ggbi.ttf';
$use_boder = isset($config['use_boder']) ? $config['use_boder'] : TRUE;
$filter_type = isset($config['filter_type']) ? $config['filter_type'] : 0;
//获取随机字符
$rndstring = '';
if ($config['word_type'] != 3)
{
for($i=0; $i<$codelen; $i++)