CI 묻고 답하기

제목 밑의 POST 자작해결
글쓴이 슈퍼개미 작성시각 2011/04/20 16:02:13
댓글 : 0 추천 : 0 스크랩 : 0 조회수 : 17650   RSS


core에 추가

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class MY_Input extends CI_Input{

    function __contstruct(){
  parent::__construct();
 }

    function post($index = '', $xss_clean = FALSE, $pointer = NULL)
    {        
        $value =  $this->_fetch_from_array($_POST, $index, $xss_clean);
        
        if (is_array($value) && !is_null($pointer))
        {
            $value = $value[$pointer];            
        }
        return $value;
    }
}

사용방법은
$a =array('1','2','3');
$this->input->post($a,false,0);
결과값은
1;
 다음글 hook 을 이용해서 view페이지를 해석해봤는데... (2)
 이전글 Caching 이용방법이 궁금합니다. (9)

댓글

없음