Home  >  Article  >  Backend Development  >  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
WBOYOriginal
2016-07-21 15:40:091130browse

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'");...
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