thinkphp笔记-建立数据

这段代码看不懂。-《thinkphph3.2.3快速入门》php

 

<?php
namespace Home\Controller;
use Think\Controller;
class FormController extends Controller{
public function insert(){
$Form = D('Form');
if($Form->create()) {
$result = $Form->add();
if($result) {
$this->success('数据添加成功!');
}else{
$this->error('数据添加错误!');
}
}else{
$this->error($Form->getError());
}
}
}thinkphp

相关文章
相关标签/搜索