A.php 에서 JQuery의 load()를 사용하여 B.php로 변수를 넘겼다.
아래의 함수를 사용하여 해결
$(document).ready(function() {
$("#position").load("b.php",{
"a01":"한글한글",
"b01":"ABCABC"
});
});
B.php에서 넘어온 변수의 한글이 깨지는 현상 발생 ~_~아래의 함수를 사용하여 해결
function unescape($text) {
return urldecode(preg_replace_callback('/%u([[:alnum:]]{4})/', create_function(
'$word',
'return iconv("UTF-16LE", "UHC", chr(hexdec(substr($word[1], 2, 2))).chr(hexdec(substr($word[1], 0, 2))));'
), $text));
}
'WEB > PHP' 카테고리의 다른 글
| [PHP] substr() 사용 (1) | 2011.05.11 |
|---|---|
| [PHP] 특정시간,날짜의 요일 구하기 (0) | 2011.04.26 |
| [PHP] 2차 배열 정렬, 재정렬 (0) | 2011.04.26 |
| [PHP] htmlspecialchars() 데이터 따옴표 로 인한 짤림 현상 (0) | 2011.04.19 |
| [PHP] sprintf() , 2자리 정수를 만들때 (0) | 2011.04.14 |