Poniższy kod działa:
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
if (!defined("IN_FUSION") || !checkrights
("I")) { header("Location: ../../index.php"); exit; } if (file_exists(INFUSIONS
."nfs_racer_u2/locale/".$settings['locale'].".php")) {
include INFUSIONS."nfs_racer_u2/locale/".$settings['locale'].".php";
include INFUSIONS."nfs_racer_u2/settings.php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."nfs_racer_u2/locale/Polish.php";
include INFUSIONS."nfs_racer_u2/settings.php";
}
opentable( $locale['xxx103'] );
<TABLE WIDTH=100% BORDER=5 BORDERCOLOR=black>
<TR BGCOLOR=#4D4D4D>
<TD WIDTH=40%><FONT color=white>Nick: </FONT></TD>
<TD WIDTH=30%><FONT color=white>GG:</FONT></TD>
<TD WIDTH=15%><FONT color=white>Ostatnio:</FONT></TD>
<TD WIDTH=15%><FONT color=white>Wynik:</FONT></TD>
</TR>");
$query = "SELECT * FROM nfsu2_ranking";
{
<td>".$table['nick']."</td>
<td>".$table['gg']."</td>
<td>".$table['ostatnio']."</td>
<td>".$table['wynik']."</td>
</TR>";
}
closetable();
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>
Po zmianie Nick: na zmienną już nie:
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
if (!defined("IN_FUSION") || !checkrights
("I")) { header("Location: ../../index.php"); exit; } if (file_exists(INFUSIONS
."nfs_racer_u2/locale/".$settings['locale'].".php")) {
include INFUSIONS."nfs_racer_u2/locale/".$settings['locale'].".php";
include INFUSIONS."nfs_racer_u2/settings.php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."nfs_racer_u2/locale/Polish.php";
include INFUSIONS."nfs_racer_u2/settings.php";
}
opentable( $locale['xxx103'] );
<TABLE WIDTH=100% BORDER=5 BORDERCOLOR=black>
<TR BGCOLOR=#4D4D4D>
<TD WIDTH=40%><FONT color=white>$locale['xxx104']</FONT></TD>
<TD WIDTH=30%><FONT color=white>GG:</FONT></TD>
<TD WIDTH=15%><FONT color=white>Ostatnio:</FONT></TD>
<TD WIDTH=15%><FONT color=white>Wynik:</FONT></TD>
</TR>");
$query = "SELECT * FROM nfsu2_ranking";
{
<td>".$table['nick']."</td>
<td>".$table['gg']."</td>
<td>".$table['ostatnio']."</td>
<td>".$table['wynik']."</td>
</TR>";
}
closetable();
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>
$locale['xxx104'] znajduje się w pliku Polish.php:
$locale['xxx104'] = "Nick:"
Pokazuje się błąd:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/n/f/s/nfs-pl/www/infusions/nfs_racer_u2/ranking.php on line 31
Ten post edytował Earth 9.12.2006, 15:36:01