Solution to php5.5 garbled code: 1. HTML page setting ""; 2. PHP page setting "header('content-type:text/html ; charset=utf-8');".
The operating environment of this article: Windows7 system, php5.5 version, DELL G3 computer
How to solve the problem of php 5.5 garbled codequestion?
Ensure that the same encoding is guaranteed in all places, if they are all utf-8
1, html5 page:
2. PHP page: header('content-type:text/html; charset=utf-8');
3. Database: mysql_query('set names utf8');
Recommended learning: "PHP video tutorial"
The above is the detailed content of How to solve the garbled problem of php 5.5. For more information, please follow other related articles on the PHP Chinese website!