实际上,我想为最新添加的游戏在另一个图像上添加一个小 gif 图像。意味着我有这样的游戏网站http://www.girlsgogames.com/ .. 我想在我最近上传的游戏的图像上添加新标签。意味着无论我上传最新的 5 款游戏,对于那些我想自动添加新标签的游戏......意味着每当我上传新的 5 款游戏时,新标签都会出现在最新游戏上。我想使用 php mysql 来实现这一点。在这种情况下,任何人都可以帮助我。我添加了小图像以供参考。
我已经添加了这段代码。请检查一次..
<div style="width:980px; float:left">
<div class="upperLeftCorner980"></div>
<div class="upperCenter980">
<div style="text-align:left">Today's Top <?php echo NEW_GAME_TITLE;?>
</div>
</div>
<div class="upperRightCorner980"></div>
<div style="clear:both"></div>
<div class="centerLeft980">
<div class="centerRight980">
<div class="boxContentDiv" style="height:100%">
<div style="width:373px; height:309px; float:left; margin-left:10px; padding-top:30px">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxx";
/* 336x280, created 1/21/11 hope page new games */
google_ad_slot = "xxxxxxxxxxxx";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</div>
<div style='padding:3px'>
<?php
$gameQuery = mysql_query ("SELECT * FROM games ORDER BY id DESC LIMIT 16");
while ($gameRow = mysql_fetch_assoc($gameQuery)){
if ($_SESSION['lang'] == 'fr'){
$description = $gameRow['description_fr'];
}else{
$description = $gameRow['description'];
}
?>
<div style='float:left; width:180px; height:160px; margin:5px;' title="<div style='font-size:12px; font-weight:bold'><b>Description:</b> <?php echo $description;?></div><div style='font-size:12px; font-weight:bold'><b><?php echo GAME_TIME_PLAYED_TITLE;?>:</b> <?php echo $gameRow['time_played'];?></div>" class='tooltip'>
<?php
$x = 0;
foreach($gameRow as $game) {
//下面是第 65 行我得到错误的地方..正好echo "<div class=''gameBGBox'>"
echo "<div class='gameBGBox'><a href='<?php echo $confRow['sitePath'];?>play/<?php echo str_replace(' ','_',$gameRow['name']);?>'><img src='<?php echo $confRow['sitePath'];?>games/images/<?php echo $gameRow['img_100x75'];?>' width='180' height='135' border='2' alt='<?php echo $gameRow['name'];?>'/></a>";
if($x<5){
echo '<div class="new"></div>';
}
echo "</div>";
$x++;
}
?> </div>
<?php } ?>
<div style='clear:both'></div>
</div>
</div>
</div>
</div>
<div class="lowerLeftCorner980"></div>
<div class="lowerCenter980"></div>
<div class="lowerRightCorner980"></div>
<div style="clear:both"></div>
<div style='height:5px'></div>
<!-- Separator -->
</div>
我收到此错误:解析错误:语法错误,意外的 T_ENCAPSED_AND_WHITESPACE,在第 65 行的 C:\xampp\htdocs\myproject\main.php 中需要 T_STRING 或 T_VARIABLE 或 T_NUM_STRING