0

我正在使用这个滑块库。我在显示图像的拇指时遇到问题。当我在拇指后结束 while 循环时,我只在 UL 和 li 标签上使用了 while 循环。它将在主图像框中显示所有图像.. 谁能告诉我如何在我的 php 代码中使用这个画廊

    <div class="image-gallery">
     <?php  if($pic_count > 0){ ?>
      <div id="wowslider-container1">
        <div class="ws_images">
          <?php while(!$rs_img_gallery->EOF) { ?>
          <ul>
            <li><img src="<?php echo MYSURL;?>img.gallery/<?php echo $rs_img_gallery->fields['image'] ?>" alt="" id="wows1_0"/></li>
         </ul>
            <?php $rs_img_gallery->MoveNext();
                } // end while(!$rs_dc_gallery->EOF) ?> 
              </div>
                <div class="ws_thumbs">
                <div>
                    <a href="#"><img src="<?php echo MYSURL;?>img.gallery/<?php echo $rs_img_gallery->fields['image'] ?>" alt="" width="120" height="90"/></a>      
                </div>
                </div>
              </div>
           <?php  }else{
            echo "<div class='notification information png_bg' style='width:90%;'>
     <div>
            ".$infomsg['msg164']."
             </div>
             </div>";
            }?>
           </div>
4

1 回答 1

0

您应该将 <UL> 从 while 循环中取出

 <div class="ws_images">
    <ul>
    <?php   while(!$rs_img_gallery->EOF) { ?>
        <li>
            <img src="<?php echo MYSURL;?>img.gallery/<?php echo $rs_img_gallery->fields['image'] ?>" alt="" id="wows1_0"/>
        </li>
    <?php 
    $rs_img_gallery->MoveNext();
    } // end while(!$rs_dc_gallery->EOF)
    ?>
    </ul> 
 </div>
于 2013-03-08T08:54:05.787 回答