<?php     $conn=mysql_connect("localhost:3306","root","111") or die("数据库服务器连接错误".mysql_error());
     mysql_select_db("db_pursey",$conn) or die("数据库访问错误".mysql_error());
     mysql_query("set names utf8;"); 
?>
<?php
$type="中文信息";
$title="中文";
$content="jiureoi";
$linkman="jiureoi";
$tel="jiureoi";
$edate=date("Y-m-d H:i:s");
$sql=mysql_query("insert into td_info(type,title,content,linkman,tel,checkstate,edate) values('$type','$title','$content','$linkman','$tel',0,'$edate')");
if($sql){
 $result=mysql_query("select * from td_info");
    $rows=mysql_fetch_assoc($result);
    print_r($rows);
}else{
 echo "<script>alert('对不起,信息发布失败!');</script>";
 echo("数据库访问错误".mysql_error());
}
?>
返回结果为中文但是插入phpmyadmin里面是乱码···数据库编码设置为:
type varchar(30) utf8_bin  是 NULL                
title varchar(50) utf8_bin  是 NULL                
content varchar(500) utf8_bin  否