Modify the file verification code file location include\validateimg.php ##Find
for($i=0;$i<4;$i ) { $rndstring .= chr(mt_rand(65,90)); }
Changed to
for($i=0;$i<4;$i ) { $rndstring .= chr(mt_rand(48,57)); }
This function is to generate random characters. If you see no numbers inside, it is to generate a character keyboard. The range of codes is originally mt_rand(65,90). This 65 to 90 is the keyboard code for the capital letters A to Z. Now modified to (48,57) represents the keyboard code from 0 to 9: mt_rand(48,57).
Also,
$bgcolor = ImageColorAllocate($im, 248,212,20); $black = ImageColorAllocate($im, 0,0,0);
such as
0,0,0 表示 黑色, 255,0,0 表示纯红, 0,255,0 表示纯绿, 0,0,255 表示纯蓝。
The above is the detailed content of How to modify the style of DedeCms verification code. For more information, please follow other related articles on the PHP Chinese website!