ie8까지 첨부 다운로드받을때 다운로드할수없는경우에 팁
download.php 를 수정합니다.
4번라인에
function download_header($filename, $mode = "write", $filepath = "") {
if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
$filename = rawurlencode($filename);
$filename = preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1);
}
header("Cache-Control: ");
header("Pragma: ");
header("Content-Type: application/octet-stream");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
if ($mode == "write") {
$file_size = 0;
}
else {
header("Content-Length: " .(string)(filesize($filepath)));
}
header('Content-Disposition: attachment; filename="'.$filename.'"');
header("Content-Transfer-Encoding: binary\n");
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 {
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");
flush();
부분을 주석처리또는 삭제하고
download_header($original, "", $filepath);
를 추가합니다.
4번라인에
function download_header($filename, $mode = "write", $filepath = "") {
if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
$filename = rawurlencode($filename);
$filename = preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1);
}
header("Cache-Control: ");
header("Pragma: ");
header("Content-Type: application/octet-stream");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
if ($mode == "write") {
$file_size = 0;
}
else {
header("Content-Length: " .(string)(filesize($filepath)));
}
header('Content-Disposition: attachment; filename="'.$filename.'"');
header("Content-Transfer-Encoding: binary\n");
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 {
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");
flush();
부분을 주석처리또는 삭제하고
download_header($original, "", $filepath);
를 추가합니다.
게시판 목록
그누4 팁자료실
그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2849 | 13년 전 | 2897 | ||
| 2848 |
|
13년 전 | 10112 | |
| 2847 | 13년 전 | 5335 | ||
| 2846 | 13년 전 | 3663 | ||
| 2845 |
|
13년 전 | 8169 | |
| 2844 |
smokingbird
|
13년 전 | 6627 | |
| 2843 | 13년 전 | 8154 | ||
| 2842 |
하하369
|
13년 전 | 5588 | |
| 2841 |
정박사닷컴
|
13년 전 | 4969 | |
| 2840 | 13년 전 | 4034 | ||
| 2839 | 13년 전 | 6607 | ||
| 2838 |
|
13년 전 | 2971 | |
| 2837 |
하하369
|
13년 전 | 6024 | |
| 2836 |
EoDee
|
13년 전 | 4404 | |
| 2835 | 13년 전 | 6066 | ||
| 2834 | 13년 전 | 3814 | ||
| 2833 | 13년 전 | 4037 | ||
| 2832 | 13년 전 | 6995 | ||
| 2831 | 13년 전 | 15578 | ||
| 2830 |
|
13년 전 | 4037 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기