다운로드 header attachment 코드 수정

This commit is contained in:
thisgun
2020-09-28 16:59:59 +09:00
parent 2f9bb48342
commit 2ff4306cc6

View File

@ -100,7 +100,8 @@ if(preg_match("/[\xA1-\xFE][\xA1-\xFE]/", $file['bf_source'])){
}
*/
$original = urlencode($file['bf_source']);
//$original = urlencode($file['bf_source']);
$original = rawurlencode($file['bf_source']);
@include_once($board_skin_path.'/download.tail.skin.php');
@ -114,7 +115,8 @@ if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_
} 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-disposition: attachment; filename=\"".basename($file['bf_source'])."\"");
header("content-disposition: attachment; filename=\"".$original."\"");
header("content-description: php generated data");
} else {
header("content-type: file/unknown");