Home > Backend Development > PHP Tutorial > PHP+MySQL5.0 Chinese garbled solution_PHP tutorial

PHP+MySQL5.0 Chinese garbled solution_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 16:00:24
Original
910 people have browsed it

I recently studied Apache2+PHP4.4.1+MySQL5.0, and the Chinese characters displayed on the page were all "???.....". I found a lot of information on the Internet and found a simple solution!

PHP script content for database connection:
config.inc.php

//Configure mysql database connection parameters
$db = mysql_connect(" localhost", "user","password");
mysql_select_db("message",$db);
//Add the following line before executing the sql statement
mysql_query("SET NAMES 'gb2312 '",$db);
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317107.htmlTechArticleRecently learning Apache2+PHP4.4.1+MySQL5.0, the page displays all Chinese as "???... ..", I found a lot of information on the Internet and found a simple solution! PHP script content for database connection: config.inc.php ?php // Configuration...
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