我刚刚安装了wamp服务器2.4并且几乎所有东西都运行良好但每次我试图打开一个带有mysql代码的文件时,他只是向我显示一个白色页面,而不是它。 这是我尝试打开'phpmyadmin'的文件之一:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head>
<body> <?php
$connect = mysql_connect("localhost", "guycohen801", "") or die ("cant connect to the server");
$db = mysql_select_db("test", $connect) or die ("cant select database");
$query = "SELECT * FROM asd3"; $result = mysql_query($query, $connect) or die ("query failed:" . mysql_error());
while ($row = mysql_fetch_array($result)) {
echo $row['1']," "; echo $row['2']," <br>";
}
mysql_close($connect); ?>
</body> </html>
在当地的主持人身上,他向我展示了一个空白的页面,当我在“查看页面上”查明了所写的内容时:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
我该如何解决这个问题?????????????