PHP configuration file php.ini, search Extension=php_gd2.dll, remove the front semicolon can;
1. Add a verify method to the module class to display the verification code
Copy the Code code as follows:
Public Function Verify () {
Import the Image class library
Import ("ORG. Util.image ");
Image::buildimageverify ();
}
2. Use the verification code in the form
Copy the Code code as follows:
3. Verification Code Refresh
Copy the Code code as follows:
4. Verification Code Verification
Copy the Code code as follows:
if ($_session[' verify '! = MD5 ($_post[' verify '])) {
$this->error (' Authenticode Error! ');
}
http://www.bkjia.com/PHPjc/746868.html www.bkjia.com true http://www.bkjia.com/PHPjc/746868.html techarticle PHP configuration file php.ini, search Extension=php_gd2.dll, remove the previous semicolon can be; 1. Add a verify method to the module class to display the CAPTCHA code copy Code as follows ...