在mysql中插入数据一直显示是???乱码,网上很多人说的试了都不对,后来经过大量查询资料,将解决方案写在下面,不同的版本有不同的解决方案吧。我的数据库版本(5.5.40)
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
init-connect=’SET NAMES utf8′
character-set-server = utf8
Statement: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