一次无意中查看网志博客网页源码,发现源码的顶头空了7行,如图:
这怎么回事?
我检查了一下模板,顶头并没发现什么空行。于是打开控制器,发现了问题,如图:
代码有空行!
去掉“”前后的空行,再查看网页源码,空行少了几行,可是还有两三行空白。打开项目模型类,再一次去掉“”前后的空行。再一次打开网页源码,发现顶头空行彻底消除!
小结:
前一次也由于类似的问题导致验证码无法正常显示,以致我折腾了好几天,我在“ThinkPHP验证码问题解决方法汇总”提到过,没想到代码空行还会导致网页源码头的空行,看来代码空行出现的问题还真多,不知以后还会惹出来什么麻烦。当然上面的问题暂时是解决了,但那是治标不治本的办法,治本的方法是:养成良好规范的编码习惯。
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article
How to fix KB5055612 fails to install in Windows 10?
4 weeks agoByDDD
Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Roblox: Grow A Garden - Complete Mutation Guide
3 weeks agoByDDD
Nordhold: Fusion System, Explained
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Atom editor mac version download
The most popular open source editor

Dreamweaver CS6
Visual web development tools
