Current location - Quotes Website - Personality signature - The php website is garbled when uploaded to the server? You must manually set the browser encoding to GB2312 to display it normally. May I ask why?
The php website is garbled when uploaded to the server? You must manually set the browser encoding to GB2312 to display it normally. May I ask why?

1. The first is the encoding of the PHP web page

1. The encoding of the PHP file itself should match the encoding of the web page

a. If you want to use gb2312 encoding, then PHP must output the header: header(" Content-Type: text/html; charset=gb2312"), add to the static page