错误:解析错误:语法错误,第35行的C:\ xampp \ htdocs \ Paginas \ RankPlayer.php中的文件意外结束
错误:解析错误:语法错误,第35行的C:\ xampp \ htdocs \ Paginas \ RankPlayer.php中的文件意外结束
错误:解析错误:语法错误,第35行的C:\ xampp \ htdocs \ Paginas \ RankPlayer.php中的文件意外结束
<?php
include ("DBConfig.php");
$result=pg_query($conn, "SELECT * FROM Players ORDER BY exp DESC LIMIT 0, 10;");
if (!$result) {
echo "query did not execute";
$rank = 1;
echo "<h1>RANKING TOP 10</h1>";
echo "<table width=\"591\" border=\"0\">";
echo "<tr>";
echo "<p><td width=\"50\">posição</td></p>";
echo "<p><td width=\"100\">Nome</td></p>";
echo "<p><td width=\"50\">Experiência</td></p>";
echo "<p><td width=\"50\">Kills</td></p>";
// echo "<p><td width=\"50\">deaths</td></p>";
// echo "<p><td width=\"50\">Patente</td></p>";
echo "</tr>";
while($array = pg_fetch_object($query)) {
echo "<tr>";
echo sprintf("<td>%d</td>", $rank++);
echo sprintf("<td>%s</td>", $array->name);
echo sprintf("<td>%d</td>", $array->exp);
//echo sprintf("<td>%d</td>", $array->kills_count_s);
// echo sprintf("<td>%d</td>", $array->deaths_count_s);
echo sprintf("<td><img src=\"Ranking\PAT\%s.gif\"/></td>", $array->rank);
echo "</tr>";
}
echo "</table>";
?>
答案 0 :(得分:0)
您应该使用}
结束if语句。将}
放在最后。