PHP Chinese garbled code_PHP tutorial

WBOY
Release: 2016-07-20 11:14:35
Original
678 people have browsed it

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...
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!