PHP头条
热点:

ThinkPHP学习札记(十)在Model中完成自动验证前台的表单数据


ThinkPHP学习笔记(十)在Model中完成自动验证前台的表单数据

index.html










UserModel.class.php

15||strlen($data)<5)
				return FALSE;
			return true;
		}
		function modelTest(){
			echo '测试的跨模型操作,调用模型中的方法';
		}
	}
?>

AutoAction.class.php

display();
	}
	function add(){
		//经过自定义模型
		$user=D('user');
		if ($user->create()) {
			if ($user->add()){
				$this->success("注册成功");
			}else{
				$this->error($user->getError());
			}
		}else{
			$this->error($user->getError());
		}
	}
}
?>


www.phpzy.comtrue/phprm/15054.htmlTechArticleThinkPHP学习札记(十)在Model中完成自动验证前台的表单数据 ThinkPHP学习笔记(十)在Model中完成自动验证前台的表单数据 index.html UserModel.class.php 15||strlen($data) AutoAction.class.php display();...

相关文章

相关频道:

PHP之友评论

今天推荐