【文件属性】:
文件名称:ThinkPHP AJAX
文件大小:39KB
文件格式:7Z
更新时间:2018-08-02 10:36:59
ThinkPHP AJAX
public function insert() {
$Form = D("Form");
if ($vo = $Form->create()) {
if (false !== $Form->add()) {
$vo['create_time'] = date('Y-m-d H:i:s', $vo['create_time']);
$vo['content'] = nl2br($vo['content']);
$this->ajaxReturn($vo, '表单数据保存成功!', 1);
} else {
$this->error('数据写入错误!');
}
} else {
$this->error($Form->getError());
}
【文件预览】:
ajax
----Common()
----index.php(210B)
----Lib()
--------Action()
--------Model()
----.htaccess(189B)
----Tpl()
--------Index()
--------Public()
----Conf()
--------config.php(265B)