当我尝试打开导出的文件时出现此错误,当我单击是时文件打开但在表格上方有错误:
<?php require '../backend/dbcon.php';
$query=mysql_query( "SELECT * FROM membership");
$total=mysql_num_rows($query);
if ($total>0) { $output .= '
<table border="1">
<tr>
<th>NO</th>
<th>Names</th>
<th>Email</th>
<th>Phone</th>
<th>Amount(N$)</th>
<th>Payment</th>
</tr>'; while ($row = mysql_fetch_array($query)) { $output .= '
<tr>
<td>' . $row["id"] . '</td>
<td>' . $row["names"] . '</td>
<td>' . $row["personal_email"] . '</td>
<td>' . $row["personal_phone"] . '</td>
<td>' . 110 . '</td>
<td>' . $row["payment"] . '</td>
</tr>
'; } $output .= '
</table>';
header("Content-Type: application/xls");
header("Content-Disposition: attachment; filename=Membe.xls"); echo $output; }