What to do if the php pop-up box is garbled

藏色散人
Release: 2023-03-04 17:24:02
Original
2541 people have browsed it

The solution to the garbled pop-up box in php: first find the encoding format in the editor; then add the code statement at the top of php as "header("Content-Type: text/html;charset=utf-8" );" and save it.

What to do if the php pop-up box is garbled

Recommendation: "PHP Video Tutorial"

Why garbled characters appear in the php pop-up box

Solution to the garbled code in the JS pop-up box written in php:

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

Then,

At the top of php, add

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

or

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

The above is the detailed content of What to do if the php pop-up box is garbled. 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 admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template