The class that generated the verification code is located in the thinkphp/extend/library/org/util/image.class.php file.
Verification Code function parameter explanation:
Length: Number of verification codes, default to 4 digits
Model: Verify string type, default to number, other support type has 0 letter 1 digit 2 Capital Letter 3 Lowercase Letter 4 Chinese 5 mix
Type: A picture of the CAPTCHA, default to PNG
Width: Verification code, the default is automatically based on the length of the verification code automatically calculated
Height: The high of the Verification Code, which defaults to 22
VerifyName: The session record name of the verification code, the default is verify.
Use:
Public Function Verify () {
import (' ORG. Util.image ');
Image::buildimageverify (6,5, ' png ', 50,25,veryfy);//fifth parameter, optional, the default is verify, can be replaced according to their own needs.
}