本文介绍了我想在底部分页,它在我的页面右侧显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 现在我正在开发PHP项目一切都很好希望但是我的网站上的问题是我在我的网站中使用分页但是分页实际上是在页脚上显示但是在我的网站中它显示在我页面的右侧你可以伙计们请帮助我如何纠正这个问题你可以看到截图以便更好地理解。 https://i.stack.imgur.com/ssnTn .png 提前致谢 我尝试了什么: < table class =table table-bordered> < thead> <?php if(isset($ _ GET ['page'])){ $ page = $ _GET [ '页']; } else { $ page = 1; } if($ page ==''|| $ page == 1){ $ page1 = 0; } else { $ page1 =($ page * 10)-10; } $ sql ='select * from divlink ORDER BY Name ASC Limit'。$ page1。',12'; $ data = $ connect-> query($ sql); // print_r($ data - > fetch_all()); while($ row = mysqli_fetch_array($ data)){ $ image = $ row ['image']; $ Name = $ row [0]; $描述= $ row [1]; $ Price = $ row [2]; $ ExpirtyDate = $ row [3]; $ Facebook = $ row [4]; $ Twitter = $ row [5]; $ Telegram = $ row [6]; $ Gmail = $ row [7]; $ Youtube = $ row [8]; $ Reddit = $ row [9]; $ Meduim = $ row [10]; $ Myetherwallet = $ row [11]; $ neowallet = $ row [12]; $ Bitcointalk = $ row [13]; $ divicon = $ row [14]; $ kyc = $ row [15]; $ id = $ row ['id']; $ Rating = $ row [17]; // echo< a href =''>< div id ='one'class ='bordered'width ='650px'>< img src ='{$ Name }'class ='imgss'/> {$ Description}< p align ='left'> {$ id}< / p>< p align ='right'> {$ Price}< / p>< img src ='{$ Facebook}'width ='20'height ='20'>< img src ='{$ Twitter}'width ='20'height ='20'align ='right '/>< img src ='{$ Gmail}'width ='20'height ='20'align ='right'/>< img src ='{$ Youtube}'width = '20'height = '20'align ='right'/>< img src ='{$ Reddit}'width ='20'height ='20'align ='right'/>< img src ='{$ Meduim }'width ='''height ='20'align ='right'/>< img src ='{$ Myetherwallet}'width ='''height ='20'align ='right'/>< ; img src ='{$ neowallet}'width ='''height ='20'align ='right'/>< img src ='{$ Bitcointalk}'width ='''height ='''align ='正确'/< img s rc ='{$ kyc}'width ='20'height ='20'align ='right'/> 1< div id ='circle'>< / div>< / a><输入类型='button'value ='赞'name ='click'class ='block'>; echo< a href =''>< div id ='one'class ='bordered'width ='650px'>< img src ='{$ image}'class ='imgss '/>< p align ='left'>< center> {$ Name}< br> {$ Description}< br> {$ Price}< / center>< / p>< p align ='right'> {$ ExpirtyDate}< / p>< center>< img src ='{$ Rating}'/>< / center>< br>< img src =' {$ Facebook}'width ='20'height ='20'align ='left'>< img src ='{$ Twitter}'width ='20'height ='20'align ='left'/> ;< img src ='{$ Gmail}'width ='''height ='20'align ='left'/>< img src ='{$ Youtube}'width ='''height = '20 'align ='left'/>< img src ='{$ Reddit}'width ='''height ='20'align ='left'/>< img src ='{$ Meduim}'width ='20'height ='20'align ='left'/>< img src ='{$ Myetherwallet}'width ='''height ='20'align ='left'/>< img src ='{$ neowallet}'width = '20'hei ght = '20'align ='left'/>< img src ='{$ Bitcointalk}'width ='20'height ='20'align ='left'/< img src ='{$ kyc} 'width ='20'height ='20'align ='left'/> < form method ='post'action =''>< input type ='hidden'name ='link_id' value ='。$ id。'/>< input type ='submit'name ='like_button'value ='like'name ='click'class ='block'>< / form> ; echo< / tr>; echo< / div>; echo'< / td>'; } ?> <?php //分页 $ sql ='select * from divlink'; $ data = $ connect-> query($ sql); $ record = $ data-> num_rows; $ records_pages = $ record / 12; $ records_pages = ceil($ records_pages); $ prev = $ page-1; $ next = $ page + 1; echo'< ul class =pagination>'; if($ prev> = 1){ echo'< li>< ; a href =?page ='。$ prev。'> prev< / a>< / li>'; } if($ records_pages > = 2){ for($ r = 1; $ r< = $ records_pages; $ r ++){ $ active = $ r == $ page?'class =active': ''; echo'< li>< a href =?page ='。$ r。'>'。$ r。'< / a>< / li>'; } } if($ next< = $ records_pages&& $ records_pages> = 2){ echo'< li>< a href =?page ='。$ next。'> next< / a>< / li>'; } if($ page!= $ records_pages&& $ records_pages> = 5){ echo'< li>< a href =?page ='。 $ records_pages '>最后< / A>< /立GT;'。 } echo'< / ul>'; ?> 解决方案 _GET ['page'])){ page = _GET [ '页']; } else { Nowadays I am working on PHP project everything is perfectly fine hopefully but the issue is in my web that I am using pagination in my site but pagination actually shows on footer but in my site it's shown on right side on my page can you guys please help me how can I correct this issue you can see screenshot for better understanding.https://i.stack.imgur.com/ssnTn.pngThanks in advanceWhat I have tried:<table class="table table-bordered"> <thead> <?phpif(isset($_GET['page'])){ $page = $_GET['page'];}else{ $page = 1;}if($page ==''||$page == 1){ $page1 = 0;}else{ $page1 = ($page*10)-10;}$sql = 'select * from divlink ORDER BY Name ASC Limit '.$page1.', 12';$data = $connect->query($sql);//print_r($data ->fetch_all());while($row = mysqli_fetch_array($data)){ $image = $row['image']; $Name = $row[0]; $Description = $row[1]; $Price = $row[2]; $ExpirtyDate = $row[3]; $Facebook = $row[4]; $Twitter = $row[5]; $Telegram = $row[6]; $Gmail = $row[7]; $Youtube = $row[8]; $Reddit = $row[9]; $Meduim = $row[10]; $Myetherwallet = $row[11]; $neowallet = $row[12]; $Bitcointalk = $row[13]; $divicon = $row[14]; $kyc = $row[15]; $id = $row['id']; $Rating = $row[17]; //echo "<a href=''><div id='one' class='bordered' width='650px'><img src='{$Name}' class='imgss'/>{$Description}<p align='left'>{$id}</p><p align='right'>{$Price}</p><img src='{$Facebook}'width='20' height='20'><img src='{$Twitter}' width='20' height='20' align='right'/> <img src='{$Gmail}' width='20' height='20' align='right'/><img src='{$Youtube}' width='20' height='20' align='right'/><img src='{$Reddit}' width='20' height='20' align='right'/><img src='{$Meduim}' width='20' height='20' align='right'/><img src='{$Myetherwallet}' width='20' height='20' align='right'/><img src='{$neowallet}' width='20' height='20' align='right'/><img src='{$Bitcointalk}' width='20' height='20' align='right'/<img src='{$kyc}' width='20' height='20' align='right'/>1<div id='circle'></div></a><input type='button' value='Like' name='click' class = 'block'>";echo "<a href=''><div id='one' class='bordered' width='650px'><img src='{$image}' class='imgss'/><p align='left'><center>{$Name}<br>{$Description}<br>{$Price}</center></p><p align='right'>{$ExpirtyDate}</p><center><img src='{$Rating}'/></center><br><img src='{$Facebook}'width='20' height='20'align='left'><img src='{$Twitter}' width='20' height='20' align='left'/> <img src='{$Gmail}' width='20' height='20' align='left'/><img src='{$Youtube}' width='20' height='20' align='left'/><img src='{$Reddit}' width='20' height='20' align='left'/><img src='{$Meduim}' width='20' height='20' align='left'/><img src='{$Myetherwallet}'width='20' height='20' align='left'/><img src='{$neowallet}'width='20' height='20' align='left'/><img src='{$Bitcointalk}' width='20' height='20' align='left'/<img src='{$kyc}' width='20' height='20' align='left'/> <form method='post' action=''><input type='hidden' name='link_id' value='".$id."' /><input type='submit' name='like_button' value='Like' name='click' class = 'block'></form> "; echo "</tr>"; echo"</div>"; echo'</td>';}?> <?php//pagination$sql = 'select * from divlink';$data = $connect->query($sql);$record = $data->num_rows;$records_pages = $record/12;$records_pages = ceil($records_pages);$prev = $page-1;$next = $page+1;echo'<ul class="pagination">';if($prev >= 1) { echo '<li><a href="?page='.$prev.'">prev</a></li>';}if($records_pages >=2){ for($r=1;$r<=$records_pages;$r++){ $active = $r == $page ? 'class ="active"' : ''; echo'<li><a href="?page='.$r.'">'.$r.'</a></li>';}}if($next <= $records_pages && $records_pages >= 2) { echo '<li><a href="?page='.$next.'">next</a></li>';}if($page != $records_pages && $records_pages >= 5){echo '<li><a href="?page='.$records_pages.'">Last</a></li>';}echo '</ul>';?> 解决方案 _GET['page'])){page =_GET['page'];}else{ 这篇关于我想在底部分页,它在我的页面右侧显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 11-01 13:47