Contents

조회 수 7794 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
385 Develop [java] Sieve of Eratosthenes (에라토스테네스의 체) hooni 2013.04.23 9728
384 Develop [c] 유닉스 프로그램에서 인수처리 해주는 getopt() 함수 file hooni 2013.04.23 8500
383 Develop [c] pcapdump 파일 분석 하는 프로그램.. ㅋㅋ file hooni 2013.04.23 7271
» Develop [php] 무조건 다운로드 받도록 header 세팅 file hooni 2013.04.23 7794
381 Develop [php] 자바스크립트 개판 만들기.. file hooni 2013.04.23 8015
380 Develop [js] 자바스크립트로 만든 게임 file hooni 2013.04.23 8736
379 Develop [js] 윤동이가 만든 영어 학습(?) 프로그램 file hooni 2013.04.23 6930
378 Develop [js] 밀리터리 프로그램(전역일 계산) 7 file hooni 2013.04.23 9485
377 Develop [js] 빈도우즈(bindows96) file hooni 2013.04.23 7691
376 Develop [js] 후리자(영규) 스타일들.. file hooni 2013.04.23 7617
375 PPT [js] xsl 강의 자료 file hooni 2013.04.23 13665
374 Develop [js] 여러가지 트리(tree) 모음.. ㅋㅋ file hooni 2013.04.23 7517
Board Pagination Prev 1 ... 62 63 64 65 66 67 68 69 70 71 ... 99 Next
/ 99