10.09.2015, 14:01
Witam, mam problem:
kod PHP:
Używam pluginu PHP in Template.
Tu działa: http://psz-serv.xaa.pl/sss.php
Tu nie: http://psz-serv.xaa.pl/graczeo.php
Kod:
[b]Parse error[/b]: syntax error, unexpected end of file in [b]/home/pszserv/public_html/graczeo.php(7) : eval()'d code(24) : eval()'d code[/b] on line [b]9[/b]
[b]Parse error[/b]: syntax error, unexpected end of file in [b]/home/pszserv/public_html/graczeo.php(7) : eval()'d code(69) : eval()'d code[/b] on line [b]11[/b]
[b]Parse error[/b]: syntax error, unexpected end of file in [b]/home/pszserv/public_html/graczeo.php(7) : eval()'d code(80) : eval()'d code[/b] on line [b]4[/b]
[b]Parse error[/b]: syntax error, unexpected '}' in [b]/home/pszserv/public_html/graczeo.php(7) : eval()'d code(93) : eval()'d code[/b] on line [b]2
kod PHP:
Kod:
<?php
require "SampQueryAPI.php";
$query = new SampQueryAPI('188.68.250.207', '7799');
if($query->isOnline())
{
$aInformation = $query->getInfo();
$aServerRules = $query->getRules();
?>
<b>General Information</b>
<table width="400">
<tr>
<td>Hostname</td>
<td><?= htmlentities($aInformation['hostname']) ?></td>
</tr>
<tr>
<td>Gamemode</td>
<td><?= htmlentities($aInformation['gamemode']) ?></td>
</tr>
<tr>
<td>Players</td>
<td><?= $aInformation['players'] ?> / <?= $aInformation['maxplayers'] ?></td>
</tr>
<tr>
<td>Weather</td>
<td><?= $aServerRules['weather'] ?></td>
</tr>
<tr>
<td>Time</td>
<td><?= $aServerRules['worldtime'] ?></td>
</tr>
<tr>
<td>Version</td>
<td><?= $aServerRules['version'] ?></td>
</tr>
<tr>
<td>Password</td>
<td><?= $aInformation['password'] ? 'Yes' : 'No' ?></td>
</tr>
</table>
<br />
<b>Online Players</b>
<?php
$aPlayers = $query->getDetailedPlayers();
if(!is_array($aPlayers) || count($aPlayers) == 0)
{
echo '<br /><i>None</i>';
}
else
{
?>
<table width="400">
<tr>
<td><b>Player ID</b></td>
<td><b>Nickname</b></td>
<td><b>Score</b></td>
<td><b>Ping</b></td>
</tr>
<?php
foreach($aPlayers as $sValue)
{
?>
<tr>
<td><?= $sValue['playerid'] ?></td>
<td><?= htmlentities($sValue['nickname']) ?></td>
<td><?= $sValue['score'] ?></td>
<td><?= $sValue['ping'] ?></td>
</tr>
<?php
}
echo '</table>';
}
}
?>
Używam pluginu PHP in Template.
Tu działa: http://psz-serv.xaa.pl/sss.php
Tu nie: http://psz-serv.xaa.pl/graczeo.php