<?php //这段代码对未通过会员认证的人进行了跳转登录页面的处理
if($_COOKIE['userRight']!= 'normalRight'){
header('location:loginPage.php');
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>历史测评结果展示页面</title>
</head>
<body>
<div align="center">
<table>
<tr>
<td>测评人</td>
<td>测评时间</td>
<td>测评序列</td>
</tr>
<?php
$userName=$_COOKIE['userName'];
require_once("database.php");//create the connection to database
$sql="SELECT * FROM result_table WHERE userName='$userName' ";
$result=$conn->query($sql);//we get all record in this step
$recordNumber=mysql_num_rows($result);//we get the total number of the records'rows which we need
for($i=1,$i<=$recordNumber,$i++) {
$sql="SELECT * FROM result_table WHERE userName='$userName' and testTime=$i";
$result=$conn->query($sql);//we get all record in this step
$row=$result->fetch_assoc();//we get the last record
print <<<'EOF'
<tr>
<td> $userName </td>
<td> $testDate </td>
<td> $testTime </td>
</tr>
EOF;
$conn->close();
?>
</table>
</div>
</body>
</html>
究竟错在哪?为什么整个页面都无法打开?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
3条回答 默认 最新
冰雪青松 2022-10-10 07:28关注你这应该是没有打开php的调试模式,如果有语法错误是没有显示的。打开php.ini把display_error = off 改为On,否则你无法去开发。
本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报解决 1无用