Contents

조회 수 7378 댓글 0
Atachment
첨부 '1'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
아래 함수 포함해서 헤더 바꿔서 읽음..
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");
        }
}


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
253 Develop [java] Sieve of Eratosthenes (에라토스테네스의 체) hooni 2013.04.23 9335
252 Develop [c] 유닉스 프로그램에서 인수처리 해주는 getopt() 함수 file hooni 2013.04.23 8068
251 Develop [c] pcapdump 파일 분석 하는 프로그램.. ㅋㅋ file hooni 2013.04.23 6898
» Develop [php] 무조건 다운로드 받도록 header 세팅 file hooni 2013.04.23 7378
249 Develop [php] 자바스크립트 개판 만들기.. file hooni 2013.04.23 7649
248 Develop [js] 자바스크립트로 만든 게임 file hooni 2013.04.23 8383
247 Develop [js] 윤동이가 만든 영어 학습(?) 프로그램 file hooni 2013.04.23 6457
246 Develop [js] 밀리터리 프로그램(전역일 계산) 7 file hooni 2013.04.23 8908
245 Develop [js] 빈도우즈(bindows96) file hooni 2013.04.23 7366
244 Develop [js] 후리자(영규) 스타일들.. file hooni 2013.04.23 7152
243 Develop [js] 여러가지 트리(tree) 모음.. ㅋㅋ file hooni 2013.04.23 7118
242 Develop [js] IE에서 인쇄 설정 팁 hooni 2013.04.23 10897
Board Pagination Prev 1 ... 45 46 47 48 49 50 51 52 53 54 ... 71 Next
/ 71