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
번호 분류 제목 글쓴이 날짜 조회 수
801 Develop [js] IE에서 인쇄 설정 팁 hooni 2013.04.23 10897
800 Develop [js] 여러가지 트리(tree) 모음.. ㅋㅋ file hooni 2013.04.23 7118
799 PPT [js] xsl 강의 자료 file hooni 2013.04.23 13180
798 Develop [js] 후리자(영규) 스타일들.. file hooni 2013.04.23 7152
797 Develop [js] 빈도우즈(bindows96) file hooni 2013.04.23 7366
796 Develop [js] 밀리터리 프로그램(전역일 계산) 7 file hooni 2013.04.23 8908
795 Develop [js] 윤동이가 만든 영어 학습(?) 프로그램 file hooni 2013.04.23 6457
794 Develop [js] 자바스크립트로 만든 게임 file hooni 2013.04.23 8383
793 Develop [php] 자바스크립트 개판 만들기.. file hooni 2013.04.23 7649
» Develop [php] 무조건 다운로드 받도록 header 세팅 file hooni 2013.04.23 7378
791 Develop [c] pcapdump 파일 분석 하는 프로그램.. ㅋㅋ file hooni 2013.04.23 6898
790 Develop [c] 유닉스 프로그램에서 인수처리 해주는 getopt() 함수 file hooni 2013.04.23 8068
Board Pagination Prev 1 ... 27 28 29 30 31 32 33 34 35 36 ... 98 Next
/ 98