我正在尝试从数据库表中检索内容并使用php脚本显示它们。我成功检索并显示了内容,并使用元标记每5秒刷新一次内容。页面还不令人耳目一新。你能帮助我吗?在这里,我附上了我的代码:
<html>
<head>
<meta http-eqiv="refresh" content="2">
</head>
<body>
<?php
session_start();
$_SESSION['username'];
$con=mysqli_connect("localhost","root","","oracle");
$result=mysqli_query($con,"SELECT * from message order by timestamp DESC");
while($row=mysqli_fetch_row($result))
{
echo "<font color='red'><b><i>" .$row['2']."
</i></b></font> says: <font color='green'><b><i>"
. $row['0']. "</i></b></font> at:" .
$row['1']. "<br>";
}
?>
</body>
</html>
答案 0 :(得分:0)
您的代码中存在拼写错误:
http-equiv="refresh"