ThinkPHP小白 POST无效
根据POST的值来显示页面,但似乎获取不到POST的值:
<br />$username = $this->$_POST['username'];<br />//$name = $this->_post('name'); 换成这行业无效。<br />$user = M('user');<br />$data = $user->where('username="'.$username.'"')->field('id,username')->find(); <br />if($data) {<br /> $this->success('成功');<br />}else{<br /> $this->error('失败');<br />}<br />