Joshchen_web format Code utf8-No BOM small detail analysis _php skills

Source: Internet
Author: User

But in the process of development, found a small details of the problem, must open F12 to see, the original, in the head of all the references inside the things and title, and so on, all ran to the body inside, and thought, Baidu, Google can not find the answer. Had to give up because he did not affect my function as well as the style on the page.

And today, in the development of other projects, the page used to frameset, I think we should all understand that frameset only placed outside the body to use. However, because of this problem, the head inside, as well as the contents of the Frmaeset all ran to the body inside, but also under the body there is a blank line, the result of the entire page is blank, without the desired effect.

Later open the Thinkphp manual, continue to learn the framework, but did not think AH. There was a word in the thinkphp Handbook that reminded me of my interest, and immediately I thought about the possible cause of this problem.
The map is as follows:

So, to Baidu a bit BOM information, the following is the information to search out:

"PHP does not ignore the BOM, so when you read, include, or reference the files, the BOM is used as part of the beginning body of the file." Depending on the characteristics of the embedded language, this string of characters will be executed directly (shown). As a result, even if the top padding of the page is set to 0, the entire page cannot be kept close to the front of the browser because there are 3 characters at the beginning of the HTML! ”

So, that's because of the problem, which leads to the head not going up. Finally found a way to solve the problem. So, download a notepad++ text editor to modify all my php files, after the change, decisive success. Suddenly happy ah ...

Modify complete, save, page refresh.

Everybody look again, the information of the head has!! It's done! My frameset finally has no problem! The previous project has been taken care of! So happy! Ha ha!!

Small program Ape is so, encountered a little problem on the annoyance of dryness, impatient to solve. However, after the solution, only to find that kind of excitement, that satisfaction ... Ah, the program ape you understand ha, we are in fact very simple!

Language can only be colloquial, not professional, don't take offense, just hope we can understand Kazakhstan.

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.