In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to solve the script garbled code in php. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
The solution of script garbled in php: 1, save the php file as ANSI code when saving; 2, set "charset=" gb2312 "" in the header of php file; 3, set "charset=" utf-8 "in the place containing the js file.
This article operating environment: Windows7 system, PHP7.1 version, DELL G3 computer
What about the script garbled code in php?
Thoroughly solve the problem of Chinese garbled codes caused by js in php
Today, when writing the login module of php, the js file is included in the php file to check the basic specifications when logging in. However, when previewing in the browser, there is a problem of garbled code (set in head). After looking up the information on the Internet and adding it to the place containing the js file, the garbled code is changed into Chinese when previewed in the browser, and continue to write down when writing another file. In order not to have the same problem, the method is the same as before, but when the browser previews again, the problem of garbled code appears again. Now we consider whether it is the problem of web page coding. After summing up, we first draw the following conclusion. In order to prevent garbled web page coding:
1. When saving the php file, save it as ANSI encoding (web page encoding format).
two。 In the header of the php file, set:.
3. Set in the place where the js file is included:
As long as these three aspects are correct, there will generally be no garbled problems.
Php what to use php is a nested acronym, is an English hypertext preprocessing language, its syntax mixed C, Java, Perl and php self-innovative syntax, mainly used to do website development, many small websites are developed in php, because php is open source, which makes php enduring.
After reading the above, do you have any further understanding of how to solve the script garbled code in php? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.