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

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

-

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,070
11년 전 조회 5,208
11년 전 조회 4,800
11년 전 조회 7,087
11년 전 조회 4,079
11년 전 조회 4,891
12년 전 조회 8,099
12년 전 조회 8,370
12년 전 조회 5,125
12년 전 조회 6,153
12년 전 조회 4,379
12년 전 조회 9,230
12년 전 조회 5,525
12년 전 조회 1.1만
12년 전 조회 6,258
12년 전 조회 7,784
12년 전 조회 1.2만
12년 전 조회 5,329
12년 전 조회 5,457
12년 전 조회 7,210