Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the details of encoding UTF8- without BOM in JoshChen_web format

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains the "JoshChen_web format coding UTF8- without BOM details", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "what are the details of JoshChen_web format coding UTF8- without BOM"!

But in the process of development, found a small detail of the problem, you have to open F12 to see, the original, in the head head of all the referenced things as well as title, and so on, all went to the body, meditation, Baidu, google can not find the answer. I had to give up because it didn't affect my function or the style on the page.

Today, when developing other projects, the page uses frameset, and I think everyone should understand that frameset can only be used outside the body. However, it is also because of this problem that all the contents of head and frmaeset are run into body, and there is a blank line under body. As a result, the whole page is completely blank, without the desired effect.

Later, I unhappily opened the ThinkPHP manual and continued to study this framework, but I didn't expect it. There was a sentence in the ThinkPHP manual that reminded me that I was interested and immediately thought of the possible cause of the problem.

The map is as follows:

So, I went to Baidu to take a look at the BOM information header. The following is the information searched by the data:

"PHP does not ignore BOM, so when reading, including, or referencing these files, BOM is used as part of the beginning body of the file. According to the characteristics of the embedded language, this string of characters will be executed (displayed) directly. As a result, even if the top padding of the page is set to 0, it will not be able to keep the entire page close to the top of the browser, because there are these three characters at the beginning of html!"

So, ah, it is precisely because of this problem that the head has been unable to lean on. Finally found a solution. So, I downloaded a Notepad++ text editor to modify all my PHP files, and after the change, it was a decisive success. I was suddenly happy.

Change completed, save, page refresh.

Let's take a look again, we have the information on the head! It's done! My frameset finally has no problem! The previous project is also done! I'm so happy! Ha ha!

Thank you for your reading, the above is the "JoshChen_web format coding UTF8- without BOM details of what" the content, after the study of this article, I believe you on the JoshChen_web format coding UTF8- without BOM details of this problem have a deeper understanding, the specific use of the need for you to practice verification. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report