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 自带的 另一种是之前新闻页用过的 显示效果稍有差别
显示效果:
View Code
显示效果:
<!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
相关文章推荐
- Yii2如何批量添加数据
- 深入剖析浏览器退出之后php还会继续执行么
- 简单理解PHP的面向对象编程方式
- 完美解决phpdoc导出文档中@package的warning及Error的错误
- php关闭warning问题的解决方法
- 浅析php静态方法与非静态方法的用法区别
- PHP基本知识
- CVE-2016-3078 PHP zip module command excute
- yii2批量添加的问题
- PHP编译安装时常见错误解决办法
- php-fpm 的安装与LNMP测试
- PHP IDE phpstorm 常用快捷键
- 客户端调用axis2服务端时报的错:Deserializing parameter 'getPersonReturn': could not find deserializer for type {
- PHP并发多进程处理利器Gearman使用介绍
- PHP入门体会
- ThinkPHP Session 使用
- PHP JQurey
- 支持读写分离、数据缓存、页面缓存的高性能PHP框架
- PHP 封装POD 类
- php 回调、匿名函数和闭包