您的位置:首页 > 编程语言 > PHP开发

2016/05/17 thinkphp3.2.2 分页的使用:①在Home下设置Publics文件夹或在thinkPHP下library的vender 把page.class.php 考贝进入 ②通过new 实例化方式调用 $page=new \Home\Publics\Page($total,3);

2016-05-17 00:43 696 查看
注意分页的方法有两种:一种是thinkphp3.2 自带的 另一种是之前新闻页用过的 显示效果稍有差别

显示效果:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>业务</title>
<style type="text/css">
a:link {
text-decoration: none;
}
</style>
<script type="text/javascript">
function jump(){
window.location="/tp/index.php/Home/Add/Add";
}
</script>
<style type="text/css">
#se{
float: left;
position: absolute;
margin-left: 150px;
}

</style>
</head>
<body><div id='se'><{$sess}> 您好!</div>
<div align="center" display:inline  style="width: 1380px;">
<h1>业务主页</h1>
<form action="__URL__/search" method="post">
<b>查询</b>    序号:<input type="text" name="ids">
 名称:<input type="text" name="name">
 价格:<input type="text" name="price">
 产地:<input type="text" name="source">
 <input type="submit" value="搜索"></input>
</form></div><br>
<table border="1" width="1000" align="center">
<tr>
<th>序号</th>
<th>名称</th>
<th>价格</th>
<th>产地</th>
<th>操作</th>
</tr>
<volist name='data' id='vo'>
<tr>
<td><{$vo.ids}></td>
<td><{$vo.name}></td>
<td><{$vo.price}></td>
<td><{$vo.source}></td>
<td><a href="/tp/index.php/Home/User/del/ids/<{$vo.ids}>">删除</a> | <a href="/tp/index.php/Home/User/modify/ids/<{$vo.ids}>">修改</a></td>
</tr>
</volist>

</table>
<div align="center"><{$list}></div>
<br>
<center>
<button onclick="jump()">添加数据</button>
</center>
</body>
</html>


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: