从网页用表显示数据库内容,一开始能运行,运行几次后就502bad了

xu15975z 2019-04-13 11:48:18
开始运行都很正常, 但是run过几次后, 对同一个没做任何改动的.php文件, 它出现了502 bad gateway的错误。
我的配置正常....如果配置不正常一开始也就运行不了了,而且我其他php文件都能运行!!
求帮忙,谢谢大家了。
我的代码:

<?php
include('connet.php');//连接数据库
session_start();
$UID = $_SESSION['uid'];
$q = "select * from buylist where UID = '$UID'";//设置查询指令
$result = mysqli_query($con, $q);//执行查询
session_destroy();
?>
<html >
<head>
<title>我的订单</title>
<link href="../css/home.css" rel="stylesheet" type="text/css">
<style>
li:nth-child(6) {
background-color: #11278a;
color: white;
font-weight: bold;
}</style>
</head>
<body>
<div>
<ul class="u1">
<li><a href="../home.html">首页</a></li>
<li><a href="../cx.html">车票查询</a></li>
<li><a href="../buy.html">车票购买</a></li>
<li><a href="../tp.html">退票</a></li>
<li><a href="../gx.html">改签</a></li>
<li><a href="wdd.php">我的订单</a></li>
</ul>
<a class="a1" href="../login.html">注销</a>
</div>
<table width="600" border="1" cellpadding="1" cellspacing="1" >
<br><br><br>
<h2 align="center">我的订单信息</h2>
<br><br>
<tr>
<th>时间</th>
<th>车次</th>
<tr>
<?php
while($row=mysqli_fetch_assoc($result))//将result结果集中查询结果取出一条
{
echo "<tr>";
echo "<td>".$row['time']."</td>";
echo "<td>".$row['chc']."</td>";
}
?>
</table>
</body>
...全文
108 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧