Develop
2013.04.23 14:06
[php] 무조건 다운로드 받도록 header 세팅
조회 수 7412 댓글 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"); } }
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
1017 | Develop | [c++] p.58 연습문제 2번 | hooni | 2003.04.23 | 16348 |
1016 | Develop | [c++] RSA Sample 4 CPP | hooni | 2013.04.23 | 9239 |
1015 | Develop |
[c++] SetWindowPos함수를 이용한 크기조절 예제
1 ![]() |
hooni | 2013.04.23 | 11101 |
1014 | Develop | [c++] String Tokenizer (나중에 c 코드로 변경해서 사용할 것) | hooni | 2013.04.23 | 11716 |
1013 | Develop | [c++] template 사용예 | hooni | 2003.04.23 | 7202 |
1012 | Develop |
[c++] Win32 API 기본 출력인 MessageBox() 함수 사용 예제..
![]() |
hooni | 2013.04.23 | 12690 |
1011 | Develop | [c++] Win32API를 이용한 ExitWindowsEx 사용한 예제코드 | hooni | 2013.04.23 | 7985 |
1010 | Develop |
[c++] Window API(MFC) 오목 게임
![]() |
hooni | 2003.04.23 | 10313 |
1009 | Develop |
[c++] WinSock2.0 채팅 프로그램 ㅋㅋ
![]() |
hooni | 2013.04.23 | 8562 |
1008 | Develop |
[c++] winsock을 이용한 서버,클라이언트와 ssl서버,클라이언트
![]() |
hooni | 2013.04.23 | 7632 |
1007 | Develop |
[c++] 가짜 인증서(하나은행) 프로그램
![]() |
hooni | 2013.04.23 | 10769 |
1006 | Develop | [c++] 기초강좌 #01(입출력,영역지정) | hooni | 2003.04.23 | 11458 |