我架了一个PHP服务器,用的是IIS5.1,php5,zend3.2和MYSQL,现在浏览一般的php网页正常,浏览与MYSQL连接的网页就不能正常显示,例如以下代码,只能显示一个空白页,是不是PHP和MYSQL连接好?哪位高手帮一下忙
<?
$db_usrname="root"; //此处填你的用户名,本例中为root
$db_password=""; //此处填你的密码,本例中为空
$conn=mysql_connect("localhost",$db_usrname,$db_password) or die ('I cannot connect to the database.');
mysql_select_db("test",$conn);
echo "Success";
?>
<?
$db_usrname="root"; //此处填你的用户名,本例中为root
$db_password=""; //此处填你的密码,本例中为空
$conn=mysql_connect("localhost",$db_usrname,$db_password) or die ('I cannot connect to the database.');
mysql_select_db("test",$conn);
echo "Success";
?>
===== === =====
你用的数据库管理员工具是什么呀?PHPmyadmin有一个默认的数据库test, 其中是没有任何数据的。
那就很邪门了
数据库连接代码没有问题 它应该会显示"Success" 怎么会空白呢?