FormAction.class.php
$Form = D('Form');
$Double = D('Double');
if ($Form->create() && $Double->create()){
$result = $Form->add();
$results = $Double->add();
if ($result && $results){
$this->success('操作成功!');
}else {
$this->error('操作失败!');
}
}else {
$this->error($Form->getError());
}
FormModel.class.php
class FormModel extends Model{
// 定义自动验证
protected $_validate = array(
array('title','require','标题必须'),
);
// 定义自动完成
protected $_auto = array(
array('create_time','time',1,'function'),
array('create_time','time',1,'function'),
);
}
结果是think_form里面的create_time有值,而think_double表的create_time为空,菜鸟请教中... 最佳答案
