Dbmier LED Artcraft Tracing Light Pad Light Box Light Board Light Table- A4

PHP Tech Blog

Dbmier LED Artcraft Tracing Light Pad Light Box Light Board Light Table- A4

留言簿(5)

Links

My Favorites

推荐技术文章

阅读排行榜

评论排行榜

ThinkPHP 数据库插入操作的代码注释

<?php
class IndexAction extends Action{
    
// 首页
    public function index(){
        
$Form= D("Form");// 加载Model类,实例化FormModel.class.php

        
// 按照id排序显示前6条记录
        $list=$Form->order('id desc')->top6();
        
$this->assign('list',$list);
        
$this->display();
    }

    
// 处理表单数据
    public function insert() {
        
$Form=D("Form");
        
if($Form->create())
        {
            
$Form->add();
            
$this->redirect();
        }
        
else
        {
            
header("Content-Type:text/html; charset=utf-8");
            
exit($Form->getError().' [ <A HREF="javascript:history.back()">返 回</A> ]');
        }
    }
    
// 生成验证码
    public function verify() {
        import(
"ORG.Util.Image");
           Image
::buildImageVerify();
    }
}
?>

posted on 2009-07-08 17:27 haix 阅读(678) 评论(0)  编辑 收藏 引用 网摘 所属分类: ThinkPHP


只有注册用户登录后才能发表评论。
网站导航:
Dbmier LED Artcraft Tracing Light Pad Light Box Light Board Light Table- A4