Develop
2013.04.23 14:06
[php] 무조건 다운로드 받도록 header 세팅
조회 수 7411 댓글 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"); } }
-
[ios] 코코아 프레임워크(Cocoa Framework) 기본적인 내용~
-
[ios] 코코아 프로그래밍의 네이밍 룰(명명 규칙)
-
[ios] 테이블뷰셀/뷰에 배경 패턴 넣기..
-
[ios] 패스(path) 앱 메뉴 스타일
-
[ios] 푸시알림(APNS)에 대한 php 라이브러리 ㅋㅋ
-
[ios] 한샘 카달로그 앱 소스 (아이폰용)
-
[ios][swift] 초간단 TableView 샘플
-
[ios][swift] 초간단 To-do Memo
-
[ios][swift] 초간단 카달로그 앱 (Catalog App)
-
[io] Apple Watch, Today Extension 앱ID 설정
-
[iphone] PerfectlyClear 보정솔루션 최신..
-
[iphone] performSelector:withObject:afterDelay: 에 대한 내용