TP Framework Write login function, verification code verification, but can not display the verification code picture

Source: Internet
Author: User
Keywords Php

Using the TP framework to write a landing interface, originally can display the verification code picture, but after the project has been transplanted, can not display the verification code picture, only display a white box, there is no verification code picture content, page display:

Look for answers!

Reply content:

Using the TP framework to write a landing interface, originally can display the verification code picture, but after the project has been transplanted, can not display the verification code picture, only display a white box, there is no verification code picture content, page display:

Look for answers!

Other outputs are estimated, or the BOM head
At the verifyImg very beginning ob_clean(); ,
Check again if the PHP file is utf-8 notBOM

If you open the GD library, see if you have installed FreeType, no freetype to reinstall PHP

You this question, I also met a few years ago, look here, the reason is very simple, your code file does not know what editor with the UTF8 BOM head, remove the good.

For example, the use of sublime set up a bit better.

Define (' DEBUG ', true);
Verifyimg method End Plus
Header (' text/html ');

And look at the error message.

If it is a Chinese picture, see if the php.ini is open mbstring

Ob_clean ();

  • 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.