조회 수 8385 추천 수 0 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
603 Develop [web] 웹 연동 프로그램 모음.. file hooni 2013.04.23 7961
602 Develop [js] IE에서 인쇄 설정 팁 hooni 2013.04.23 11946
601 Develop [js] 여러가지 트리(tree) 모음.. ㅋㅋ file hooni 2013.04.23 8347
600 Develop [js] 후리자(영규) 스타일들.. file hooni 2013.04.23 8340
599 Develop [js] 빈도우즈(bindows96) file hooni 2013.04.23 8335
598 Develop [js] 밀리터리 프로그램(전역일 계산) 7 file hooni 2013.04.23 11132
597 Develop [js] 윤동이가 만든 영어 학습(?) 프로그램 file hooni 2013.04.23 7974
596 Develop [js] 자바스크립트로 만든 게임 file hooni 2013.04.23 9342
595 Develop [php] 자바스크립트 개판 만들기.. file hooni 2013.04.23 8528
» Develop [php] 무조건 다운로드 받도록 header 세팅 file hooni 2013.04.23 8385
593 Develop [c] pcapdump 파일 분석 하는 프로그램.. ㅋㅋ file hooni 2013.04.23 8057
592 Develop [c] 유닉스 프로그램에서 인수처리 해주는 getopt() 함수 file hooni 2013.04.23 9313
591 Develop [java] Sieve of Eratosthenes (에라토스테네스의 체) hooni 2013.04.23 10464
590 Develop [js] 사진첩에 쓸 내용 - 마우스 오버로 바꾸기 hooni 2013.04.23 7434
589 Develop [js] 폼(form) 전송시 중복 클릭 방지 간단한 구문 hooni 2013.04.23 10112
588 Develop [ajax] 샘플 코드와 한글처리에 대한 간단한 설명 hooni 2013.04.23 7724
Board Pagination Prev 1 ... 14 15 16 17 18 ... 53 Next
/ 53