<?php $conn=@mysql_connect("localhost","root","") or die ("no"); mysql_select_db("hpf",$conn); mysql_query("set name ‘GBK‘"); ?>
>
php简单的连接数据库
原文:http://www.cnblogs.com/yxysuanfa/p/6962097.html