私は次のphpコードを持っています:
<?php
include "../config.php"; //includes the connection data
$query="SELECT userinvites.user_id, COUNT( * ) AS user_count, users.fname, users.lname, users.image
FROM userinvites
INNER JOIN users ON userinvites.user_id = users.user_id
GROUP BY user_id
ORDER BY COUNT( * ) DESC
LIMIT 0 , 10"; //basic query that gets the data for leaderboard
$result = mysql_query($query) or die(mysql_error());
echo '<table width="285" border="0" cellpadding="0" cellspacing="0">' ;
while($row = mysql_fetch_array($result)){
//echo "-". $row['image']. " - ". $row['fname']. " - ". $row['lname']. " - ". $row['user_count'];
//echo "<br />";
echo '<tr>';
echo "<td height='40'> ". $row['image']. "</td>";
echo "<td>". $row['fname']. " ". $row['lname']. "</td>";
echo "<td>" . $row['user_count']. "</td>";
echo "</tr>";
}
echo '</table>';
?>
このコードだけを.phpページに配置すると、正常に機能します。このスクリプトを他の.phpページにインポートしようとすると、データ圧縮でsthが間違っているというメッセージが表示されます。何が起こっているのかについてのアイデアはありますか?