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 > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what are the methods to solve the js garbled code in phpcms. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.
How to solve phpcm js garbled code
Solution:
Method 1:
phpcmd load js garbled code is because there is no uniform encoding, the reason is, because, if you load js, and did not declare the encoding format of js, then the browser will default to the current html encoding format to parse the introduced js file, if your js and its own page encoding is not the same, and js introduced Chinese characters, then there will definitely be garbled code.
Method 2:
Add the charset attribute to the tag that introduces js
This introduction, then this xx.js will be parsed with its own page encoding, and if the two encodings are different, if this js is the encoding of gbk, then we can write
So, as long as it is guaranteed that this js file is indeed utf-8 or the corresponding, you write the code yourself, then no matter what kind of coding page refers to this js, there will be no coding problem, so writing is the most standardized, the first way will appear in a situation, that is, there are very few cases, due to some non-standard reasons, we will find that even when the code is unified, there will be garbled code, then we'd better use the second way to write.
What are the ways to solve js garbled phpcms to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
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.