0
CodeIgniter를 처음 사용했습니다. 업데이트 용 웹 서비스 REST를 만들고 싶습니다. CodeIgniter 및 REST로 데이터를 업데이트하는 방법
이
내 컨트롤러 :function user_post()
{
$result = $this->user_model->update($this->get('id'),
'name' => $this->post('name'));
if($result === FALSE)
{
$this->response(array('status' => 'failed'));
}
else
{
$this->response(array('status' => 'success'));
}
}
그리고이 기능은 내 모델에 있습니다
function update($id, $name)
{
$sql = "UPDATE user SET name=? WHERE id=?";
$this->db->query($sql, array($name,$id));
}
나는 그것이 작동하지 않습니다 index.php/exemple/user/id/1?method=post/name=Bill
하여 함수를 호출
에서는 작동하지 않습니다? 출력은 무엇입니까? 그리고 나는 당신이 읽어야한다고 생각한다; [CI URLS] (http://ellislab.com/codeigniter/user-guide/general/urls.html) – rcpayan