Develop
2013.04.23 14:06
[php] 무조건 다운로드 받도록 header 세팅
조회 수 7380 댓글 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"); } }
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
289 | Develop | [ios] 코코아 프레임워크(Cocoa Framework) 기본적인 내용~ | hooni | 2013.04.23 | 27684 |
288 | Develop | [ios] 코코아 프로그래밍의 네이밍 룰(명명 규칙) | hooni | 2017.05.11 | 1187 |
287 | Develop | [ios] 테이블뷰셀/뷰에 배경 패턴 넣기.. | hooni | 2013.04.23 | 29815 |
286 | Develop | [ios] 패스(path) 앱 메뉴 스타일 | hooni | 2013.06.11 | 0 |
285 | Develop | [ios] 푸시알림(APNS)에 대한 php 라이브러리 ㅋㅋ | hooni | 2013.04.23 | 16636 |
284 | Develop | [ios] 한샘 카달로그 앱 소스 (아이폰용) | hooni | 2013.04.23 | 10922 |
283 | Develop | [ios][swift] 초간단 TableView 샘플 | hooni | 2016.06.27 | 746 |
282 | Develop | [ios][swift] 초간단 To-do Memo | hooni | 2016.06.27 | 1073 |
281 | Develop | [ios][swift] 초간단 카달로그 앱 (Catalog App) | hooni | 2016.06.27 | 7133 |
280 | Develop | [io] Apple Watch, Today Extension 앱ID 설정 | hooni | 2016.04.20 | 801 |
279 | Develop | [iphone] PerfectlyClear 보정솔루션 최신.. | hooni | 2013.05.28 | 0 |
278 | Develop | [iphone] performSelector:withObject:afterDelay: 에 대한 내용 | hooni | 2013.04.23 | 65867 |