Home > Backend Development > PHP Tutorial > PHP安插数据库是乱码

PHP安插数据库是乱码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:00:26
Original
784 people have browsed it

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

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

这样,我这样执行以后然后刷新还是一样,不知道怎么解决呢,如果一个页面解决了,那如果多个页面都需要插入到数据怎么办呢,求有经验的告诉下,谢谢。
------解决方案--------------------
对了,mysql_query("SET NAMES 'uft8'",$link);这里
utf8最好大写成UTF8

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