티스토리 뷰
function setEncoding($string, $charset) {
$detect_charset = mb_detect_encoding($string, "UTF-8, EUC-KR");
$converted_string = mb_convert_encoding($string, $charset, $detect_charset);
return $converted_string;
}
'PHP & MySQL' 카테고리의 다른 글
출력제어 (0) | 2015.08.28 |
---|---|
크로스도메인 허용 (0) | 2015.07.02 |
진수 변환 (0) | 2015.06.11 |
메일 발송용 함수 (참조, 숨김참조, 파일첨부 포함) (0) | 2015.05.27 |
특정 문자열 사이의 문자열 추출 (0) | 2015.05.27 |