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.
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");
or
header("Content-Type: text/html;charset=utf-8");
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!