Solution:
1. Check whether PHP has the GD extension installed and turned on; (Recommended to learn : PHP video tutorial)
2. The reason for the utf-8 BOM header. Use Editplus or ultraedit to delete it. (https://blog.csdn.net/oscar999/article/details/6280006)
3. Caching problem in the output buffer. Before output, use the ob_clean function to solve it.
4. Before output, echo, print_r, var_dump, etc. cannot appear. Comment or delete to solve the problem.
The code after solving the problem:
The result is displayed as follows:
The above is the detailed content of PHP verification code does not display solution. For more information, please follow other related articles on the PHP Chinese website!