카테고리 없음

php 엑셀다운로드시에 한글이 깨질 경우

하늘치 2016. 6. 21. 09:24
반응형

// header( "Content-type: application/vnd.ms-excel; charset=utf-8" );


header("Content-Disposition: attachment; filename=\"$excel_file\"");

header("Expires: 0");

header("Cache-Control: must-revalidate, post-check=0,pre-check=0");

header("Pragma: no-cache");


print("<meta http-equiv=\"Content-Type\" content=\"application/vnd.ms-excel; charset=utf-8\">"); 




- - - - - - - - - 



첫 번째 줄의 


header( "Content-type: application/vnd.ms-excel; charset=utf-8" );


요 값을 주석처리 하고, 마지막 줄의 


print("<meta http-equiv=\"Content-Type\" content=\"application/vnd.ms-excel; charset=utf-8\">"); 


요 값을 넣었더니 해결됨..


반응형