dedecms中显示数字验证码的修改方法
输入字母验证码,俺觉得特烦,特别还要输入大写字母。于是找到文件并修改成数字验证码。
修改文件 验证码文件位置
include\validateimg.php
找到
for($i=0;$i{
$rndstring .= chr(mt_rand(65,90));
}
改成
for($i=0;$i{
$rndstring .= chr(mt_rand(48,57));
}
这个函数是产生随机字符,看见里面的数字没有,它就是要产生字符键盘码的范围,原来的是
mt_rand(65,90),这个65到90是大写字母A到Z的键盘码。
现在修改为(48,57) 表示0到9的键盘码:mt_rand(48,57)。
按照这个理论,估计能产生中文吧。
还有这个文件里面的
$bgcolor = ImageColorAllocate($im, 248,212,20);
$black = ImageColorAllocate($im, 0,0,0);
是设定生成图片的背景颜色和文字颜色的。三个数字表示 颜色的 红,绿,蓝色值。范围为0到255,
比如
0,0,0 表示 黑色,
255,0,0 表示纯红,
0,255,0 表示纯绿,
0,0,255 表示纯蓝。
255.255.255 表示白。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool