输入banner图图片脚本导航/分类

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());
		}
	}
}
?>