Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
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.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
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:
and provide relevant evidence. A staff member will contact you within 5 working days.