为什么我在此处点击缩略图时会在大照片下获得未定义的内容以及如何解决此问题?我试过在这里评论一切没有效果?以下是代码和审核网址:
<td><div id="loadarea" style="width: 400px; height: 300px;">
<img width="400" height="300" src="http://www.mydomain.com/feeds/fmfl/rets_images/<?php echo(rawurlencode($row['ListingRid'])); ?>_1.jpg" alt="<?php echo(rawurlencode($row['MLNumber'])); ?>" align="left" border="0">
</div>
<?
$image = "<br>";
$ListingRid = $row['ListingRid'];
$img_cnt = 1;
//$image .= "<a href=/feeds/fmfl/rets_images/{$ListingRid}_1.jpg rel=\"enlargeimage\" rev=\"targetdiv:loadarea,trigger:click\"><img src=/feeds/fmfl/rets_images/{$ListingRid}_1.jpg alt='' width='100' height='75' border='0' /></a> ";
for ($c=1;$c<10;$c++) {
if ($c<10)
$c_ext = $c;
else
$c_ext = $c;
if (file_get_contents("http://www.mydomain.com/feeds/fmfl/rets_images/{$ListingRid}_{$c_ext}.jpg"))
$image .= "<a href=/feeds/fmfl/rets_images/{$ListingRid}_{$c_ext}.jpg rel=\"enlargeimage\" rev=\"targetdiv:loadarea,trigger:click\"><img src=/feeds/fmfl/rets_images/{$ListingRid}_{$c_ext}.jpg alt='' width='100' height='75' border='0' /></a> ";
else
$c=12;
$img_cnt++;
if ($img_cnt == 5) {
$image .= "<br>";
$img_cnt = 0;
}
}
?>
答案 0 :(得分:2)
因为您缺少标题标记
尝试使用标题:
$image .= "<a href=/feeds/fmfl/rets_images/{$ListingRid}_{$c_ext}.jpg rel=\"enlargeimage\" rev=\"targetdiv:loadarea,trigger:click\" title=\"THIS IS TITLE\"><img src=/feeds/fmfl/rets_images/{$ListingRid}_{$c_ext}.jpg alt='' width='100' height='75' border='0' /></a> ";
或没有标题:
$image .= "<a href=/feeds/fmfl/rets_images/{$ListingRid}_{$c_ext}.jpg rel=\"enlargeimage\" rev=\"targetdiv:loadarea,trigger:click\" title=\"\"><img src=/feeds/fmfl/rets_images/{$ListingRid}_{$c_ext}.jpg alt='' width='100' height='75' border='0' /></a> ";
灯箱需要标题,如果您不想要任何内容,则应设置title=""
。