phpmyadmin 中文 显示 乱码 问题 解决

first, add :
charset=gb2312
在 meta 里面
to your ”head“

second:
add :
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
mysql_query("set names 'gb2312'"); // this line very important!!!

third:
creat data base like this: //see gb2312 and utf8_unicode_ci. important!!!
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(200) CHARACTER SET gb2312 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=39 ;

fourth:
MySQL 连接校对:utf8_unicode_ci

Comments

Popular posts from this blog

How to install and configure PHP5 with IIS6 on Windows Server 2003 in five easy steps.

How to switch PASV and PORT model in FLAHSGET