Home >Backend Development >PHP Tutorial >mysql - PHP插入数据库数据时汉字被编码存入

mysql - PHP插入数据库数据时汉字被编码存入

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:49:541128browse

本地(win)测试是正常汉字,但服务器(centos)中存入每个汉字自动转换成类似

<code>试
</code>

的格式.数据库都是utf8,数据插入前也写了$mysqli->set_charset("utf8");文件也是utf8格式的,谷歌了很多没找到解决办法。求助。

这个问题已被关闭,原因:

回复内容:

本地(win)测试是正常汉字,但服务器(centos)中存入每个汉字自动转换成类似

<code>试
</code>

的格式.数据库都是utf8,数据插入前也写了$mysqli->set_charset("utf8");文件也是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