以数据库test 表格mysqlcode为例
实例代码:
<?php
$conn = mysql_connect("localhost","root","");
mysql_query("set names 'gbk'");//这就是指定数据库字符集,一般放在连接数据库后面就可
mysql_select_db("test");
$sql = "select * from mysqlcode";
$result = mysql_query($sql,$conn);
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<tit...