SESSION and verification code: the server is installed with the ThinkPHP framework developed by the apache website. The built-in verification code picture member registration page uses the verification code, html page: & lt; IMG & nbsp; id = "verifyImg" & nbsp; src = "_ APP _/Ba SESSION and verification code
The server is installed with apache
The website is developed using the ThinkPHP framework and comes with a verification code image.
The member registration page uses the verification code and the html page:
Code used by the program to determine the verification code image during registration:
If ($ _ SESSION ['verify ']! = Md5 ($ _ POST ['verify '])
Exit ('verification code error! ');
The program should be fine, because it is normal for me to test locally and on the server.
However, someone said that the verification code was entered correctly during registration. The result showed that the verification code was incorrect!
He said it would not work with IE or FF browsers ......
I went up to test that I had registered a new member. others registered members were also successful.
I don't know what's wrong with me?
I doubt the web environment: Is there a problem with apache + php? Share:
------ Solution --------------------
Individual cannot
It indicates that the problem is related to the client, or it is all on the client.
------ Solution --------------------
Add one sentence
If (isset ($ _ SESSION ['verify ']) & $ _ SESSION ['verify']! = NULL & $ _ SESSION ['verify ']! = ''){
// Continue to judge whether the verify value is equal;
} Else {
Echo 'session [verify] value does not exist or is empty, check whether the server's session function is normal ';
}
------ Solution --------------------
His browser settings problems.
------ Solution --------------------
Reference:
The server is installed with apache
The website is developed using the ThinkPHP framework and comes with a verification code image.
The member registration page uses the verification code and the html page:
During registration, the program judges the generation of the verification code image ......
The owner can check whether cookies are disabled in browsers that cannot be correctly operated.