In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "php how to solve the problem that the page content is not centered". In the daily operation, I believe that many people have doubts about how to solve the problem that the page content is not centered by php. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubt that "php how to solve the problem of page content is not centered". Next, please follow the editor to study!
1, put the include file in the head, not on the html or doctype, this can solve the center problem, blank lines can be used to include the include file, but this is not the fundamental solution.
2. The fundamental solution is to open the include file with DW, modify the toolbar-> Page Properties-> title Encoding-> include the Unicode signature (BOM) and remove the check box.
In this case, no matter where it is included, there will be no such problem. Of course, you can also use other editors to remove it.
Analyze the reasons:
When a file is saved in UTF-8 encoding, there are two situations: with Unicode signature (BOM) and without Unicode signature. BOM information is a string of hidden characters at the beginning of a file that some editors recognize as a UTF-8-encoded file.
But for PHP, PHP did not consider the problem of BOM in the design, will not ignore the three characters of the BOM at the beginning of the UTF-8-encoded file, and will take BOM as part of the body at the beginning of the file. Because it has to be in
Because of these three characters at the beginning of the html, even if the top padding of the page is set to 0, it will not make the entire page close to the top of the browser. Due to the limitation of the COOKIE exit mechanism, COOKIE cannot send out files that already have BOM at the beginning of these files (because PHP has already sent the header before COOKIE is sent), so the login and logout functions are invalid. All functions that rely on COOKIE and SESSION are invalid.
At this point, the study on "how to solve the problem that the content of the page is not centered by php" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.