逻辑越权
一、环境准备
1、创建表
2、添加一个注册方法和对应的模型
public function index(){
$User = D("User"); // 实例化User对象
if (!$User->create()){ // 创建数据对象
// 如果创建失败 表示验证没有通过 输出错误提示信息
exit($User->getError());
}else{
// 验证通过 写入新增数据
$User->add();
}
}
<?php
namespace Home\Model;
use Think\Model;
class IndexModel extends Model
{
protected $_auto = array (
array('password','md5',3,'function') , // 对password字段在新增和编辑的时候使md5函数处理
array('score','10'),
array('username','','3','ignore'),
);
}
二、添加一个用户
三、越权