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

相關文章
相關標籤/搜索