ThinkPHP Verification Code solution-PHP development

Source: Internet
Author: User
The Verification Code cannot be displayed or displayed as a red cross. I was so frustrated after several days. I searched many posts on the thinkphp official forum and did not solve the problem. I finally sent a help post "thinkphp3.1 stubborn Verification Code Red Cross !", Here, I would like to express my gratitude for the answers to the FAQ (nickname of the Forum). The problem has finally been solved. Here, I will release my post and make a summary by the way, hoping that others will not take my detour. The Verification Code cannot be displayed or displayed as a red cross. I was so frustrated after several days. I searched many posts on the thinkphp official forum and did not solve the problem. I finally sent a help post "thinkphp3.1 stubborn Verification Code Red Cross !", Here, I would like to express my gratitude for the answers to the FAQ (nickname of the Forum). The problem has finally been solved. Here, I will release my post and make a summary by the way, hoping that others will not take my detour.


Below is my post:
Q: There are two projects (WBlog) in the front and back. The verification code in the back end is displayed normally, but not in the front end !!!???
Debugging process:
Background code:

class PublicAction extends Action { public function verify(){   import('ORG.Util.Image');   Image::buildImageVerify(4,1,gif,48,22,'verify');  } }

Debugging result 1

Front-end code:

Class TextAction extends Action {// home page public function index () {import ('org. util. image '); Image: buildImageVerify (, gif, 'verify ');}}

Debugging result:


From the preceding debugging process, we can see that:
They are in the same server, so configuration items are the same, and image classes are placed in the core package,
You can exclude loading path errors.
It was also called as follows:
Public function verify (){
Import ('org. Util. image ');
Image: buildImageVerify ();
}
BOM has tried to determine the encoding to filter.
But it is still an old problem. The backend display is normal, not before the front-end !!!
Help !!!!!!!!!

Water ordinary reply solution:

You haven't solved the problem since you asked me so many days. I downloaded the code and read it. It's all about you. Why do you say this? I'll give it to you one by one:



Let's take a look at your code. First, read the W3note \ Lib \ Action \ TextAction. class. php file.



You can see the W3note \ Lib \ Action \ CommonAction. class. php file ..


When these are deleted, the verification code is displayed normally...

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.