时间:2021-07-01 10:21:17 帮助过:2人阅读
$username = $this->$_POST['username'];
//$name = $this->_post('name'); 换成这行业无效。
$user = M('user');
$data = $user->where('username="'.$username.'"')->field('id,username')->find();
if($data) {
$this->success('成功');
}else{
$this->error('失败');
}