hwp 한글파일 다운로드시 깨짐 문제 해결과 다운로드명 그대로 나오게 하기
그누커머스 게시판에서 hwp 한글파일을 첨부후 다운로드 받을 때 깨지거나 이름이 변경되어 보이는 경우가 있습니다. 이 문제는 아래와 같이 해결할 수 있으니 필요하신 분들 참고하시기 바랍니다.
==============================
/gnucommerce/bbs/download.php
==============================
아래 문구로 검색하여 소스 교체합니다.
if(preg_match("/msie/i
교체할 소스
if(preg_match("/msie/i 부터 flush(); 까지 아래 소스로 교체...
------------------------------------------------
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
header("content-type: doesn/matter");
header("content-length: ".filesize("$filepath"));
header("content-disposition: attachment; filename=\"$original\"");
header("content-transfer-encoding: binary");
} else if (preg_match("/Firefox/i", $_SERVER['HTTP_USER_AGENT'])){
header("content-type: file/unknown");
header("content-length: ".filesize("$filepath"));
header("content-disposition: attachment; filename=\"".basename($file['bf_source'])."\"");
header("content-description: php generated data");
} else {
header("content-type: file/unknown");
header("content-length: ".filesize("$filepath"));
header("content-disposition: attachment; filename=\"$original\"");
header("content-description: php generated data");
}
header("pragma: no-cache");
header("expires: 0");
ob_clean();
flush();
댓글 2개
파일 깨지는 문제 해결했습니다. 감사합니다.
게시판 목록
그누커머스 팁자료실
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 25 |
|
6년 전 | 2360 | |
| 24 | 7년 전 | 5058 | ||
| 23 | 7년 전 | 2356 | ||
| 22 | 7년 전 | 3124 | ||
| 21 |
|
8년 전 | 3369 | |
| 20 | 8년 전 | 7164 | ||
| 19 | 8년 전 | 4925 | ||
| 18 | 8년 전 | 4439 | ||
| 17 | 8년 전 | 3604 | ||
| 16 | 8년 전 | 3567 | ||
| 15 | 9년 전 | 3052 | ||
| 14 |
|
9년 전 | 3400 | |
| 13 | 9년 전 | 5067 | ||
| 12 | 9년 전 | 4759 | ||
| 11 | 9년 전 | 4960 | ||
| 10 | 9년 전 | 5166 | ||
| 9 |
|
9년 전 | 5216 | |
| 8 |
|
9년 전 | 4537 | |
| 7 |
|
9년 전 | 5060 | |
| 6 |
|
9년 전 | 7242 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기