PHP 엑셀다운로드 시 한글 깨질 경우

· 12년 전 · 6154
깨질때의 헤더

-

header( "Content-type: application/vnd.ms-excel" );
header( "Content-Disposition: attachment; filename=$_POST[filename].xls" );
header( "Content-Description: PHP4 Generated Data" );
header( "Content-charset=euc-kr" );

-


수정한 헤더

-

header( "Content-type: application/vnd.ms-excel; charset=euc-kr" );
header( "Content-Disposition: attachment; filename=$_POST[filename].xls" );
header( "Content-Description: PHP4 Generated Data" );
print("<meta http-equiv=\"Content-Type\" content=\"application/vnd.ms-excel; charset=euc-kr\">");

-

이제 안깨진다.

원본글 출처: superb1204.egloos.com/3271374
|
댓글을 작성하시려면 로그인이 필요합니다.

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
11년 전 조회 4,071
11년 전 조회 5,210
11년 전 조회 4,802
11년 전 조회 7,087
11년 전 조회 4,081
12년 전 조회 4,893
12년 전 조회 8,100
12년 전 조회 8,370
12년 전 조회 5,127
12년 전 조회 6,155
12년 전 조회 4,379
12년 전 조회 9,230
12년 전 조회 5,527
12년 전 조회 1.1만
12년 전 조회 6,262
12년 전 조회 7,788
12년 전 조회 1.2만
12년 전 조회 5,330
12년 전 조회 5,460
12년 전 조회 7,211