Utf8 BOM Problem

Source: Internet
Author: User
When I recently tested smarty, there was no problem at the beginning. Later I found that CSS errors always occur on the displayed pages. Later I directly output TPL as HTML without any problems, however, once the smarty output is used, an error occurs. No exception is found in the HTML source query, finally, we can't help but use ue to compare the output HTML source and TPL. We found that four spaces are added in front of the page header output by smarty, which is the four leading spaces, I checked the poor information on the Internet and found that it is caused by utf8 BOM problems, because PHP does not support Bom, it does not ignore the three characters at the beginning of the UTF-8-encoded file Bom, it is very easy to solve the problem after finding the problem. Open UE and save the file as UTF without Bom. This simple problem has plagued me for three days.

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.