Garbled characters appear in the php form jump box

angryTom
Release: 2023-02-28 08:30:02
Original
2632 people have browsed it

Garbled characters appear in the php form jump box

The php form jump box appears with garbled characters

What should I do if the JS pop-up box written in php appears with garbled characters? What's the solution?

1. First, find the encoding format in your editor. Set to utf-8 format, most encodings now use this. Of course, there are also GB2312

Garbled characters appear in the php form jump boxHere is SublimeText as an example.

2. Then, add

header("Content-Type: text/html;charset=gb2312");
Copy after login

or

header("Content-Type: text/html;charset=utf-8");
Copy after login

at the top of php. For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of Garbled characters appear in the php form jump box. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!