0
안녕하세요 여러분, 제가 링크를 연결하는 방법에 대해 뭔가 물어 보았습니다. 내 웹 응용 프로그램에서, 나는 컨트롤러를 가지고이직접 링크를 만들어 uri 세그먼트를 얻는 방법
http://localhost/ttaportal/ref_application/manage_access/18
같은 가져 오기 URI 세그먼트로 직접 링크를 만들 것
function insert_access(){
$id = $this->uri->segment(3);
$refAppAccess = $this->input->post('accessId');
$refApplicationId = $this->input->post('appId');
$refDepartmentId = $this->input->post('deptId');
$data = array(
"refApplicationId" => $refApplicationId,
"refDepartmentId" => $refDepartmentId
);
$action = $this->ref_application_model->insert_access($data);
if($action == 1) {
$this->session->set_flashdata('message', 'Application access has been added successfully');
}
else {
$this->session->set_flashdata('message', 'Failed to add application access');
}
redirect(base_url() . 'ref_application/manage_access/'.$id, 'refresh');
}
내가 이미이 함께 노력하지만 항상
http://localhost/ttaportal/ref_application/
로 리디렉션
정말 도움이 필요합니다. 감사합니다 :) (동일한 컨트롤러의 경우)
이
어떤 코드를 당신의'ref_application' 컨트롤러의 존재 또는 당신은 또한 시도 할 수 리디렉션
에 대한 BASE_URL를 사용하지 말아야? –
난 이미이 시도하고 내 메서드 이름 $ this-> manage_acces ($ id); http : // localhost/ttaportal/ref_application /로 리디렉션합니다. http : // localhost/ttaportal/ref_application/manage_acces/$ id로 리디렉션합니다. –