I accidentally checked the source code of the website of wangzhi blog and found that seven lines were left blank at the top of the source code. What happened? I checked the template and found no blank lines at the top. So I opened the controller and found the problem. The code is blank! Remove the blank lines before and after "" and check the source code of the Web page. There are several blank lines, but there are still two or three blank lines. Open the project model class and remove the blank lines before and after. Once again, open the web page source code and find that the header is completely removed! I accidentally checked the source code of the website of wangzhi blog, and found that seven lines were left blank at the top of the source code,
What's going on?
I checked the template and found no blank lines at the top. So I opened the controller and found the problem,
The code is empty!
Remove" "Blank lines before and after, and then view the web page source code, empty lines are a few less lines, but there are two or three lines of blank. Open the project model class and remove" . Once again, open the web page source code and find that the header is completely removed!
Summary:
The previous verification code could not be properly displayed due to a similar problem, so I had to go over it for several days.ThinkPHP Verification Code SolutionAs mentioned above, I didn't expect empty lines of code to cause empty lines in the source code header of the web page. It seems that there are many problems with empty lines of code and I don't know what problems will be caused in the future. Of course, the above problem is solved for the time being, but that is the way to cure the problem. The method to cure the problem is:Develop good coding habits.