Thinkphp Verification Code does not show a workaround _php tutorial

Source: Internet
Author: User
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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.