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