살려주세요... 게시글 엑셀 다운로드 할때 한글깨짐현상

살려주세요... 게시글 엑셀 다운로드 할때 한글깨짐현상

QA

살려주세요... 게시글 엑셀 다운로드 할때 한글깨짐현상

본문


<?
header( "Content-type: application/vnd.ms-excel;charset=KSC5601");
header( "Content-Disposition: attachment; filename=list.xls" );
header( "Content-Description: PHP4 Generated Data" );
include "_common.php";

if($_POST['chk_wr_id']) {
 $in = implode(", ", $_POST['chk_wr_id']);
 $where = "WHERE wr_id IN($in)";
}
?>

<html>
<body>
 <table border="1">
 <tr>
  <th>wr_id</th>
  <th>title</th>
 </tr>
<?

$que = sql_query("SELECT * FROM g5_write_".$_POST['bo_table']." ".$where." ORDER BY wr_id DESC"); 
 
while($row = sql_fetch_array($que)) {
?>
 <tr>
  <td><?=$row['wr_id']?></td>
  <td><?=$row['wr_subject']?></td>
 </tr>
<?
}
?>
</table>
</body>
</html>​

 

 

다운받을때 한글이 계속 깨져서 나옵니다.

아래처럼 하면 한글이 안깨지고 잘 나오는데요..

아무래도 DB에서 불러 올때 파일 캐릭터셋을 변환해줘야 하는데

어느 파일에서 어떤부분에 어떤 소스를 수정해야 할지 모르겠습니다.

 

UTF-8서버 사용중입니다.

도와주세요 ㅠㅠ

 

 


<?
header( "Content-type: application/vnd.ms-excel;charset=KSC5601");
header( "Content-Disposition: attachment; filename=list.xls" );
header( "Content-Description: PHP4 Generated Data" );
?>

<html>
<body>
 <table border="1">
<tr>
  <td>한글이 안깨지고 잘 나와요</td>  
 </tr>
</table>
</body>
</html>​

 

이 질문에 댓글 쓰기 :

답변 2

답변을 작성하시기 전에 로그인 해주세요.
전체 0 | RSS
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT