Home > Backend Development > PHP Tutorial > 编码-php插入到mysql数据库中文乱码,数据库中的中文可以正常显示

编码-php插入到mysql数据库中文乱码,数据库中的中文可以正常显示

WBOY
Release: 2016-06-02 11:30:08
Original
878 people have browsed it

编码php数据库

PHP获取HTML的POST内容到数据库,插入以后显示乱码,我数据库编码已经设置成UTF8了,然后插入之前我ECHO出来也不是乱码,但是到数据库里面就成乱码了,不知道为什么呢,问之前我已经搜索过了,说要先执行

mysql_query("SET NAMES 'uft8'",$link);

这样,我这样执行以后然后刷新还是一样

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template