Generate random verification?-php Tutorial

Source: Internet
Author: User
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.

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.