Home > Backend Development > PHP Tutorial > When linking to the mysql database in DW, the solution to the problem of garbled characters in the character set_PHP tutorial

When linking to the mysql database in DW, the solution to the problem of garbled characters in the character set_PHP tutorial

WBOY
Release: 2016-07-21 15:40:09
Original
1144 people have browsed it

Just when Chinese characters are garbled, add this sentence after the link database:
utf8
mysql_query("SET NAMES 'utf8'");
gbk
mysql_query("SET NAMES 'gbk' ");

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321434.htmlTechArticleWhen Chinese characters are garbled, add this utf8 sentence after the link database mysql_query("SET NAMES 'utf8 '"); for gbk mysql_query("SET NAMES 'gbk'");...
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