질문Q #21657
$this->uri->segment(3) 값을 못 가져오는 현상...
신일2019-09-02 00:32:34

안녕하세요, 궁금한 사항이 있어 질문 드려봅니다

http://abcd.co.kr/my_client/my_recruit_edit_01/340 에서 

340 값을 가져오기 위해 $this->uri->segment(3)를 대입했는데, 값을 가져오지 못하고 있습니다. true라고만 값이 찍히네요;;

참고로 $this->uri->segment(2)를 찍어보니, 정상적으로  'my_recruit_edit_01'  <====잘 가져와 집니다.

이런 현상 겪으신 분 계신가요?

 

public function my_recruit_edit_01()                                                        
{
	$this->form_validation->set_rules('recruit_name', '리크루트명', 'required');

	if ( $this->form_validation->run() == TRUE )                                             
	{
	    $data = array(                                                                        
		  'rbs_id' => $this->uri->segment(3) ,     ///////////////////대입한 부분!!!
		  'db_table_name' => 'recruit_basic' ,                                               
		  'mem_id' => $this->session->userdata('mem_id') ,                                   
		  'recruit_name' => $this->input->post('recruit_name', TRUE) ,                       
	    );
        $result = $this->recruit_basic_m->my_recruit_edit_01_update($data);   

 

답변2
#1 변종원(웅파) 2019-09-02 10:19:38
$this->uri->segment_array() 이 함수의 결과를 출력해보세요.
#2 신일 2019-09-02 11:49:19
웅파님, 한번 찍어보겠습니다~