文章标题
来源:互联网 发布:电脑怎么解除网络限制 编辑:程序博客网 时间:2024/06/05 17:15
<?php//读取数据header("Content-Type:text/html;charset=utf-8");class IndexAction extends Action { public function index() { $db = M('User');//实例化模型类, $select = $db->where('user="mr"')->order('id desc')- >limit(3)->select();//执行查询语句 $this->assign('select',$select);//模板变量赋值 $this->display();//制定模板页 } public function insert() { $dba = M('User');//实例化模型类, $data['user'] = 'mr'; $data['pass'] = md5('mrsoft'); $data['address'] = '保定市'; $result = $dba->add($data);//执行添加数据 if($result) { $this->redirect('Index/index',:,2,'页面跳转中');//页面重定向 } }}?>
<foreach name='select' item='user'> <tr class="content"> <td bgcolor="#FFFFFF"> {$user.id}</td> <td bgcolor="#FFFFFF"> {$user.user}</td> <td bgcolor="#FFFFFF"> {$user.address}</td> </tr> </foreach><form id="form1" name="form1" method="post" action="_URL_/insert">input type="submit" name="button" id="button" value="数据添加"/></form>
0 0
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- lintcode-Swap Nodes in Pairs -451
- 驱动调试
- 使用sizeof计算类的大小
- poj 2758(后缀数组)
- JAVA 文件编码转换
- 文章标题
- GlobalInterceptor
- bzoj3890【Usaco2015 Jan】Meeting Time
- Using C-style cast. Use reinterpret_cast<int*>(…) instead [readability/casting] [4]
- 必须熟练英语
- 黑马程序员——Blocks
- 数据库学习1——基本概念和重要术语
- 欢迎使用CSDN-markdown编辑器
- unity3d仿仙剑角色控制