글쓴사람 고지훈
글쓴시간2023년 12월 13일 오전 9시 55분 47초
    제목Template_.class.php 파일 함수 수정해도 되나요?
function assign($arg)
    {
     
       if (is_array($arg))
       {
           $var = array_merge($var=&$this->var_[$this->_current_scope], $arg);
       }
       else
       {
           $this->var_[$this->_current_scope][$arg] = func_get_arg(1);
       }
    }

해당 함수에서... $arg 혹은  func_get_arg(1) 의 내용을

json_decode( str_replace("특정단어", "특정단어2", json_encode(데이터)), true);

로 바꾸게 되면 혹시 큰 문제가 생길까요?
관리자 고지훈님 안녕하세요

assign() 메소드를 수정하기 보다는
assign_json() 같은 이름으로 메소드를 만들어서
json 처리하고 assign()에 넘겨주는 편이 좋을 거 같습니다.

그리고 신규 프로젝트라면 Tplus를 권장합니다.
23-12-13 17:55
    이름
비밀번호
 
Since 2003-03-03 hosted on vultr.com