첨부파일명이 외국어일시 다운로드 이슈 수정
This commit is contained in:
@ -76,8 +76,12 @@ if (!get_session($ss_name))
|
|||||||
|
|
||||||
$g5['title'] = '다운로드 > '.conv_subject($write['wr_subject'], 255);
|
$g5['title'] = '다운로드 > '.conv_subject($write['wr_subject'], 255);
|
||||||
|
|
||||||
//$original = urlencode($file['bf_source']);
|
//파일명에 한글이 있는 경우
|
||||||
$original = iconv('utf-8', 'euc-kr', $file['bf_source']); // SIR 잉끼님 제안코드
|
if(preg_match("/[\xA1-\xFE][\xA1-\xFE]/", $file['bf_source'])){
|
||||||
|
$original = iconv('utf-8', 'euc-kr', $file['bf_source']); // SIR 잉끼님 제안코드
|
||||||
|
} else {
|
||||||
|
$original = urlencode($file['bf_source']);
|
||||||
|
}
|
||||||
|
|
||||||
@include_once($board_skin_path.'/download.tail.skin.php');
|
@include_once($board_skin_path.'/download.tail.skin.php');
|
||||||
|
|
||||||
@ -86,6 +90,11 @@ if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_
|
|||||||
header("content-length: ".filesize("$filepath"));
|
header("content-length: ".filesize("$filepath"));
|
||||||
header("content-disposition: attachment; filename=\"$original\"");
|
header("content-disposition: attachment; filename=\"$original\"");
|
||||||
header("content-transfer-encoding: binary");
|
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 {
|
} else {
|
||||||
header("content-type: file/unknown");
|
header("content-type: file/unknown");
|
||||||
header("content-length: ".filesize("$filepath"));
|
header("content-length: ".filesize("$filepath"));
|
||||||
|
|||||||
Reference in New Issue
Block a user