|
发表于 2011-4-25 21:02:08
|
显示全部楼层
哈哈测试成功了...出了点小插曲...
$this->input->xss_clean($this->input->post('sex'))
这个是老版本的写法,我测试的是2.0版本:
function adduser() {
$data = array(
'name' => $this->security->xss_clean($this->input->post('name')),
'age' => $this->security->xss_clean($this->input->post('age')),
'sex' => $this->security->xss_clean($this->input->post('sex'))
);
$this->db->insert('users', $data);
}
安全类有所改变. |
|