Home >Backend Development >PHP Tutorial >PHP Chinese garbled code_PHP tutorial

PHP Chinese garbled code_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:14:35734browse

I’m bored recently doing PHP page connection to mysql

I found Chinese garbled characters

The final solution is recorded for future reference

1. When creating the database, select utf-8 encoding

2. Select UTF-8 encoding when creating a php file

3. Prevent garbled characters during data transmission mysql_query('set names utf8');

4. Add

to the static page

You should just pay attention to the four points above.!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440284.htmlTechArticleRecently, I was bored when connecting mysql to the PHP page and found that the Chinese garbled code was finally solved. I will record it now for future reference. 1. Create When creating the database, select utf-8 encoding 2. When creating the php file, select UT...
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