Generate random verification? I downloaded a random verification code on the internet. The image is always unavailable.
But my colleagues can show that the code is correct. why?
What configurations do I need to add?
Reply to discussion (solution)
Find extension = php_gd2.dll in the php configuration file and remove the previous; no., and then restart it.
Maybe your code file has a bom header to remove it.
Paste the code for analysis.
You can comment out the header sentence to see if there is any error.
The second floor is correct. The GD2 database is not open.
Http://www.cnblogs.com/zcy_soft/archive/2011/07/06/2098771.html
Give a link and try gd2.
The method on the second floor can be displayed after I use it, but it cannot be displayed when I return to the dormitory to run it again. I have attached the code
A square with a cross is displayed during running.
Comment out the header ("Content-Type: image/png"). the following error occurs:
Notice: Use of undefined constant code-assumed 'code' in...
$ Num1 = $ _ SESSION [code]; the error message is returned. it is useless. you can delete it.
Alternatively, you can add error_reporting (E_ALL &~ _ Notice); to block notice errors. This can also be solved.
This is what I run
Can you run the above code? Is the verification code displayed after running?
The following method can be used.
Extension = php_gd2.dll remove the previous
I made the code into another incorrect verification code.