The login function written in the TP framework has verification code, but the verification code image cannot be displayed.

Source: Internet
Author: User
A login interface written in the TP framework can display the verification code image. However, after the project is transplanted, the verification code image cannot be displayed, but only one white box is displayed, there is no content for the verification code image. The page displays: Hope to answer!

A login interface written in the TP framework can display the verification code image. However, after the project is transplanted, the verification code image cannot be displayed, but only one white box is displayed, the content of the Verification Code image is not displayed on the page:

Hope to answer!

Reply content:

A login interface written in the TP framework can display the verification code image. However, after the project is transplanted, the verification code image cannot be displayed, but only one white box is displayed, the content of the Verification Code image is not displayed on the page:

Hope to answer!

It is estimated that there are other outputs, orBOMHeader
InverifyImgStartob_clean();,
Check whether the PHP file isutf-8NoneBOM

If the GD library is enabled, check whether freetype is installed. If freetype is not enabled, reinstall PHP.

You have encountered this problem a few years ago. Here, the reason is very simple. You don't know what editor you use with the UTF8 BOM header. just remove it.

For example, use Sublime to set it.

Define ('debug', true );
VerifyImg method end
Header ('text/html ');

Let's see how error messages are prompted.

For a Chinese image, check whether mbstring is enabled in php. ini.

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.