php动态滚动加载实例
2020-12-13 05:44
阅读:573
YPE html>
标签:style blog class c code java
内容涉及:php、分页、jquery、div+css
实例下载:http://download.csdn.net/detail/roro5119/7373905
index.php
//数据库配置文件 include("conn.php"); //默认搜索 $page = $_GET["page"] ? $_GET["page"] : 1; $pagesize = 20; $pageval = ($page-1)*20; $sql="select `pic` from `mypic` limit $pageval,$pagesize"; $query = mysql_query($sql); ?> span>PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">延迟加载 class="showbox"> while($row=mysql_fetch_array($query)){ ?> " width="200" height="200"> } ?>class="add-more">数据正在加载...
异步文件:
//数据库配置文件 include("conn.php"); //每页显示信息 $pagesize=20; //最大加载次数 $maxnum = $_POST["maxnum"]-1; //从哪里开始 $page=$_POST["page"]; $nextpagestart = $page*$pagesize; $sql = "select `pic` from `mypic` limit $nextpagestart,$pagesize"; $query =mysql_query($sql); while($row = mysql_fetch_array($query)){ //内容 ?> " width="200" height="200"> } //分页 if($page ==$maxnum){ include(‘page.class.php‘); $sqlsum = "select `id` from `mypic`"; $querysum = mysql_query($sqlsum); //数据总数 $total = mysql_num_rows($querysum); //参数对应位置:总记录,每页显示的条数,当前页,连接的地址 $my_page=new PageClass($total,$pagesize,$page,‘?page={page}‘); //输出页码 echo $my_page->myde_write(); exit; } ?>
php动态滚动加载实例,搜素材,soscw.com
php动态滚动加载实例
标签:style blog class c code java
原文地址:http://www.cnblogs.com/tinyphp/p/3738527.html
评论
亲,登录后才可以留言!