cheidtor 제거
This commit is contained in:
@ -1540,4 +1540,24 @@ function is_utf8($str)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------
|
||||
Charset 을 변환하는 함수
|
||||
-----------------------------------------------------------
|
||||
iconv 함수가 있으면 iconv 로 변환하고
|
||||
없으면 mb_convert_encoding 함수를 사용한다.
|
||||
둘다 없으면 사용할 수 없다.
|
||||
*/
|
||||
function convert_charset($from_charset, $to_charset, $str)
|
||||
{
|
||||
|
||||
if( function_exists('iconv') )
|
||||
return iconv($from_charset, $to_charset, $str);
|
||||
elseif( function_exists('mb_convert_encoding') )
|
||||
return mb_convert_encoding($str, $to_charset, $from_charset);
|
||||
else
|
||||
die("Not found 'iconv' or 'mbstring' library in server.");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user