1,在使用数据库之前一定要写入这句mysql_query("set names 'utf8'");,其他类型的自行设置
$connect = mysql_connect("localhost","root","root");
if(!$connect){
die("connect database fail! error = "+mysql_error());
}
mysql_query("set names 'utf8'");
1,在使用数据库之前一定要写入这句mysql_query("set names 'utf8'");,其他类型的自行设置
$connect = mysql_connect("localhost","root","root");
if(!$connect){
die("connect database fail! error = "+mysql_error());
}
mysql_query("set names 'utf8'");