Develop
2013.04.23 14:06
[php] 무조건 다운로드 받도록 header 세팅
조회 수 8386 댓글 0
첨부 '1' |
---|
아래 함수 포함해서 헤더 바꿔서 읽음..
function printDownloadHeader($filename, $filesize) { global $HTTP_USER_AGENT; if( eregi("(MSIE 5.0|MSIE 5.1|MSIE 5.5|MSIE 6.0)", $HTTP_USER_AGENT) ) { if(strstr($HTTP_USER_AGENT, "MSIE 5.5")) { header("Content-Type: doesn/matter"); header("Content-Length: $filesize"); header("Content-Disposition: filename=$filename"); //header("Content-Transfer-Encoding: binary"); header("Expires: 120"); header("Cache-Control: cache, must-revalidate"); } if(strstr($HTTP_USER_AGENT, "MSIE 5.0")) { header("Content-type: file/unknown"); header("Content-Length: $filesize"); header("Content-Disposition: filename=$filename"); header("Expires: 120"); header("Cache-Control: cache, must-revalidate"); } if(strstr($HTTP_USER_AGENT, "MSIE 5.1")) { header("Content-type: file/unknown"); header("Content-Length: $filesize"); header("Content-Disposition: filename=$filename"); header("Expires: 120"); header("Cache-Control: cache, must-revalidate"); } if(strstr($HTTP_USER_AGENT, "MSIE 6.0")) { header("Content-type: file/unknown"); header("Content-Length: $filesize"); header("Content-Disposition: filename=$filename"); //header("Content-Transfer-Encoding: binary"); header("Expires: 120"); header("Cache-Control: cache, must-revalidate"); } } else { header("Content-type: file/unknown"); header("Content-Length: $filesize"); header("Content-Disposition: filename=$filename"); header("Expires: 120"); header("Cache-Control: cache, must-revalidate"); } }
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
481 | Develop | [java] Interface 와 abstract | hooni | 2013.04.23 | 11277 |
480 | PPT |
[ajax] 크로스 도메인(Cross Domain) 이슈 해결 방안
![]() |
hooni | 2013.04.23 | 22961 |
479 | Develop | [ios] 코코아 프레임워크(Cocoa Framework) 기본적인 내용~ | hooni | 2013.04.23 | 28959 |
478 | System/OS |
[doc] 코코아 프로그래밍 for MACOS 관련 내 분량..
![]() |
hooni | 2013.04.23 | 21894 |
477 | Develop | [ios] 참고할만한 좋은 예제 소스.. | hooni | 2013.04.23 | 28178 |
476 | Develop | [js] 수학 공식을 제공하는 Math 객체 | hooni | 2013.04.23 | 16363 |
475 | Develop | [js] 간단한 게임 프로토타입 (HTML5 와는 무관) | hooni | 2013.04.23 | 16356 |
474 | Develop |
[android] 자동차 리모컨 소스코드
![]() |
hooni | 2013.04.23 | 17082 |
473 | PPT |
[doc] 발표 자료 ㅎㅎtalk4neo
![]() |
hooni | 2013.04.23 | 21813 |
472 | PPT |
[ppt] Equation Solving 발표 자료 (@PWE랩 톡데이 2011.07.26)
![]() |
hooni | 2013.04.23 | 26218 |
471 | Develop | [android] [번역] 안드로이드 Android Cloud to Device Messaging(C2DM) | hooni | 2013.04.23 | 22617 |
470 | Develop | [ios] Objective-C 문자열 조작 메서드 | hooni | 2013.04.23 | 27810 |