php configuration file php.ini, search for extension=php_gd2.dll, and remove the semicolon in front;
1. Add a verify method to the module class to display the verification code
Copy the code The code is as follows:
Public function verify(){
// Import Image class library
import("ORG.Util.Image");
Image::buildImageVerify();
}
2. Use verification code in the form
Copy code The code is as follows:
3. Verification code refresh
Copy code The code is as follows:
4. Verification code verification
Copy code The code is as follows:
if($_SESSION['verify'] ! = md5($_POST['verify'])) {
$this->error('Verification code error!');
}
http://www.bkjia.com/PHPjc/746868.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/746868.htmlTechArticlephp configuration file php.ini, search for extension=php_gd2.dll, and remove the preceding semicolon; 1 .Add a verify method in the module class to display the verification code. Copy the code as follows...