There are a large number of collections and solutions to the problem of Chinese garbled characters in PHP pages. The Chinese garbled characters are generally caused by the inconsistency between the database and the page encoding. Let me directly introduce the solutions to you. ,
1. When creating a database, select utf-8 encoding
2. Select UTF-8 encoding when creating a php file
3. Prevent garbled characters during data transmission mysql_query('set names utf8');
4. Add
to the static page
Personal suggestion: It is recommended that the encoding of the database, php file, and html charset be set to consistent utf-8 before development.