本文介绍了如何在动态滑块中获得多个图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在用PHP做一个动态网站。我有我的'新闻&事件'部分作为滑块。内容可以从后端添加。问题是我在网站上只能看到1个事件。无论我从后端添加多少事件,我都看不到更多。有人可以帮帮我吗? 我尝试过: < div id =portfolioclass =portfolio>< h3 class =wthree_title_agile>< span style =color:#5a0c4d> L< / span> atest更新< / h3> <?php require_once(admin / config / connection.php); // $ psize =; // $ proicode =; // $ probarcode =; $ nname =; // $ proitems =; $ nid =; $ query1 =select * from news_tb; $ resource1 = mysql_query($ query1,$ connection); $ result2 =; $ nid =; while($ record = mysql_fetch_array($ resource1)) { $ nid = $ record ['nid']; $ nimg =uploadsn /\".$ record ['nimg']; $ nname = $ record ['nname']; $ result2。=< ul id ='flexiselDemo1'> < li> < div class ='w3_agile_portfolio_grid'> < img src = '$ nimg'alt =''class ='img-responsive'> < div class ='w3layouts_news_grid_pos'> < a href ='#'>< ; div class ='wthree_text'>< h3> $ nname< / h3>< / div>< / a> < / div> < / div> ; < / li> < / ul>; } ?> <?php echo $ result2;?> < / div> 解决方案 psize =; // proicode =; // probarcode =; I'm doing a dynamic site in PHP. I have my 'News & Event' section as a slider. The content can be added from the backend. The problem is that I can see only 1 event in my website. I cannot view more than that, no matter how many events i add from the backend. Can somebody help me?What I have tried:<div id="portfolio" class="portfolio"><h3 class="wthree_title_agile" ><span style="color:#5a0c4d">L</span>atest Updates </h3> <?phprequire_once("admin/config/connection.php");//$psize="";//$proicode="";//$probarcode="";$nname="";//$proitems="";$nid="";$query1="select * from news_tb";$resource1=mysql_query($query1,$connection);$result2="";$nid="";while($record=mysql_fetch_array($resource1)){ $nid=$record['nid']; $nimg="uploadsn/".$record['nimg']; $nname=$record['nname']; $result2.="<ul id='flexiselDemo1'> <li> <div class='w3_agile_portfolio_grid'> <img src='$nimg' alt=' ' class='img-responsive' > <div class='w3layouts_news_grid_pos'><a href='#'><div class='wthree_text'><h3>$nname</h3></div></a></div></div> </li> </ul>";} ?> <?php echo $result2;?></div> 解决方案 psize="";//proicode="";//probarcode=""; 这篇关于如何在动态滑块中获得多个图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-29 13:08