Home > Backend Development > PHP Tutorial > PHP connection mysql garbled solution_PHP tutorial

PHP connection mysql garbled solution_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:05:48
Original
808 people have browsed it

php tutorial connection mysql tutorial garbled solution

The most common reason for garbled characters is to directly connect to the mysql database tutorial without setting the encoding for the connection query. The commonly used method is mysql_query("set names 'gb2312'"), which can mostly be solved. Let's look at a solution that cannot be solved by the above method. Processing methods.

$link = mysql_connect('localhost','root','');

mysql_query("set character_set_connetion=utf8,character_set_result=utf8, character_set_client=binary",$link);

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630756.htmlTechArticlephp tutorial to connect to mysql tutorial garbled code solution The common problem with garbled code is to directly connect to the mysql database tutorial without setting the encoding for the connection query , the commonly used one is mysql_query(set names 'g...
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template