此页面无效
<div class="container" style="padding-left: 0">
<table class="table table-bordered">
<thead>
<tr>
<th></th>
<th>ETA</th>
<th>Vessel type</th>
<th>Vessel</th>
<th>Flag</th>
<th>Origin</th>
<th>Destination</th>
<th>Arrival/Departure</th>
<th>Remark</th>
<th>User</th>
</tr>
</thead>
<tbody>
<?php
global $wpdb;
$today = date('Ymd');
$todayuploads = $wpdb->get_results ( "SELECT * FROM tblvessel WHERE upload_date = $today ORDER BY date DESC, type, vessel, av_dp ASC" );
foreach ( $todayuploads as $todayupload ) {
$id = $todayupload->id;
?>
<tr>
<td><input type="checkbox" name="vschbox[]" value="<?php echo $id; ?>"></td>
<td><?php echo date_format(date_create($todayupload->date), 'd/m/Y' ); ?> <?php echo $todayupload->eta_etd; ?></td>
<td>
<?php
$conv_type = $todayupload->type;
switch ($conv_type) {
case 1:
echo "Container Barges";
break;
case 2:
echo "General Cargo Barges";
break;
case 3:
echo "Tourist Vessel";
break;
case 4:
echo "Motor Tanker";
break;
default:
echo "Invalid Vessel Type";
}
?>
</td>
<td><?php echo $todayupload->vessel;?></td>
<td><?php echo $todayupload->flag;?></td>
<td><?php echo $todayupload->origin;?></td>
<td><?php echo $todayupload->destination;?></td>
<td>
<?php
$conv_avdp = $todayupload->av_dp;
switch ($conv_avdp) {
case 1:
echo "Arrival";
break;
case 2:
echo "Departure";
break;
default:
echo "Invalid Arrival/Departure Type";
}
?>
</td>
<td><?php echo $todayupload->remark;?></td>
<td><?php echo $todayupload->user;?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<form action="" method="post" id="deletedataform">
<input type="submit" name="delete" value="Delete" class="btn btn-info pull-right" style="width:100px; margin-bottom:10px;" />
</form>
</div>
<?php
global $wpdb;
if(isset($_POST['delete'])){
$checkbox = $_POST['vschbox'];
for($i=0;$i<count($checkbox);$i++){
$del_id = $checkbox[$i];
$message = "Data deleted successfully !";
}
}
?>
HTTP错误500
我知道这是某种服务器错误。我几乎整天都在处理这个错误。我检查了日志,但仍然无法追踪错误。我在这里检查了类似的错误,但是所有解决方案都没有帮助我。 请帮忙。谢谢。
localhost is currently unable to handle this request.
这是我在错误日志中得到的错误。
答案 0 :(得分:0)
由于wordpress还没有准备好支持php7而引起的问题。我使用了wordpress
和降级的wordpress
版本。因此,PHP不支持wordpress。
两种解决方案,
一种是更新php
,另一种是降级wordpress
。
我不想更新php7.2
,所以我将php5.6
的版本降级为{{1}}。现在可以正常工作了。