메뉴 건너뛰기

프로그램언어

조회 수 7334 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

<?
include "../inc/global.inc";

$sql = "select upfile,upfile2,upfile3,upfile_name,upfile2_name,upfile3_name from ez_bbs where code = '$code' and idx = '$idx'";
$result = mysql_query($sql) or error(mysql_error());
$row = mysql_fetch_object($result);

if($no == ""){
 $file = "./upfile/$code/$row->upfile"; $filename = $row->upfile_name;
}else if($no == "2"){
 $file = "./upfile/$code/$row->upfile2"; $filename = $row->upfile2_name;
}else if($no == "3"){
 $file = "./upfile/$code/$row->upfile3"; $filename = $row->upfile3_name;
}

if(file_exists($file)) {
  
   if( strstr($HTTP_USER_AGENT,"MSIE 5.5")){
       header("Content-Type: doesn/matter");
       header("Content-Disposition: filename=$filename");
       header("Content-Transfer-Encoding: binary");
       header("Pragma: no-cache");
       header("Expires: 0");
   }else{
       Header("Content-type: file/unknown");
       Header("Cache-Control: cache, must-revalidate");
       Header("Content-Disposition: attachment; filename=$filename");
       Header("Content-Description: PHP3 Generated Data");
       header("Pragma: no-cache");
       header("Expires: 0");
   }
  
   if(is_file("$file")){
       $fp = fopen("$file","r");
       if(!fpassthru($fp)) {
           fclose($fp);
       }
   }
 
}else{
   echo "<script>alert('첨부파일이 존재하지 않습니다.');history.go(-1);</script>";
}

?>



  1. No Image 07Feb
    by
    2024/02/07 Views 79 

    PHP 버전 숨기기 ( php version hide )

  2. No Image 12Jan
    by
    2023/01/12 Views 188 

    php 두날짜 사이의 모든날짜 배열 만들기

  3. No Image 12Jan
    by
    2023/01/12 Views 202 

    PHP str_replace php 문자열치환

  4. No Image 12Jan
    by
    2023/01/12 Views 214 

    PHP 이미지 리사이즈 함수 imagecopyresized

  5. HTTP 인증하기, 로그인창 띄우기

  6. No Image 27Mar
    by
    2021/03/27 Views 215 

    [PHP기초] 상속기본

  7. No Image 12Jan
    by
    2023/01/12 Views 216 

    코드 생성 하기

  8. No Image 12Jan
    by
    2023/01/12 Views 225 

    폴더 용량 체크

  9. No Image 12Jan
    by
    2023/01/12 Views 225 

    PHP SimpleHtmlDom Parser로 HTML 파싱하기

  10. No Image 26Mar
    by
    2021/03/26 Views 229 

    조건문의 함수실행 여부 if ( 0 && ... )

  11. No Image 12Jan
    by
    2023/01/12 Views 231 

    ereg(), eregi(), ereg_replace(), eregi_replace(), split() 대체

  12. No Image 12Jan
    by
    2023/01/12 Views 233 

    PHP 파일 업로드 FORM 처리

  13. No Image 26Mar
    by
    2021/03/26 Views 234 

    배열 연산자 []= 에 대해서

  14. No Image 27Mar
    by
    2021/03/27 Views 235 

    클래스와 인스턴스 그리고 메소드 만들기

  15. No Image 12Jan
    by
    2023/01/12 Views 236 

    웹페이지 파싱

  16. No Image 12Jan
    by
    2023/01/12 Views 237 

    PHP 디렉토리안에 파일 리스트 가져오기

  17. No Image 12Jan
    by
    2023/01/12 Views 239 

    php www 붙이기

  18. No Image 26Mar
    by
    2021/03/26 Views 240 

    상수, 마법상수, 모든 상수 보기

  19. No Image 12Jan
    by
    2023/01/12 Views 240 

    PHP http -> https 로 전환

  20. No Image 12Jan
    by
    2023/01/12 Views 240 

    PHP 하위 디렉토리 포함 디렉토리 리스트 출력

Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved