<?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无用
悬赏问题
- ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
- ¥15 谁有desed数据集呀
- ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
- ¥15 关于#hadoop#的问题
- ¥15 (标签-Python|关键词-socket)
- ¥15 keil里为什么main.c定义的函数在it.c调用不了
- ¥50 切换TabTip键盘的输入法
- ¥15 可否在不同线程中调用封装数据库操作的类
- ¥15 微带串馈天线阵列每个阵元宽度计算
- ¥15 keil的map文件中Image component sizes各项意思