日期:2014-05-17 浏览次数:20722 次
<?php
header ( "Content-Type:text/html; charset=utf-8" );
$host = "localhost";
$user = "root";
$password = "";
@$conn = mysql_connect($host,$user,$password) or die("数据库连接失败,请检查数据库配置!" . mysql_error());
$tableName = "viuoo";
mysql_select_db($tableName,$conn) or die('数据库表选择出错,请检查数据库表名是否正确!');
mysql_query("SET NAMES 'utf-8'");
$dm = "SELECT * FROM user";
$result = mysql_query($dm,$conn);
while($res = mysql_fetch_row($result)){
print_r($res);
}
?>