pC.NET

Welcome to oscc.kr



 제로보드4 파일 다운로드부분
2019-10-15 17:52:51
Hit : 6123

작성자 : 피시키드

제로보드 4에서 한글 처부파일 다운로드시 다운 로드 안되는 현상 해결방안
게시판을 찾아도 명쾨한 답도없고해서 우연중으로 손혜정님께서 리플로 답을 올리신 내용을 여기에 올립니다

손혜정씨께서 리플로 달으신 내용을 여기에 올립니다

제로보드가 설치된 곳의 download.php 파일을 열으셔서 아래부분을 그대로 붙여 넣으시기합니다

<?
/***************************************************************************
* 공통 파일 include
**************************************************************************/
include "_head.php";

if(!eregi($HTTP_HOST,$HTTP_REFERER)) die();

/***************************************************************************
* 게시판 설정 체크
**************************************************************************/

// 사용권한 체크
if($setup[grant_view]<$member[level]&&!$is_admin) Error("사용권한이 없습니다","login.php?id=$id&page=$page&page_num=$page_num&category=$category&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&file=zboard.php");

// 현재글의 Download 수를 올림;;
mysql_query("update $t_board"."_$id set download".$filenum."=download".$filenum."+1 where no='$no'");

$data=mysql_fetch_array(mysql_query("select * from $t_board"."_$id where no='$no'"));

// 다운로드;;
$filename="file_name".$filenum;
header("location:$data[$filename]");

if($connect) {
@mysql_close($connect);
unset($connect);
}
?>

이렇게 적혀 있습니다.

이걸..



<?
/***************************************************************************
* 공통 파일 include
**************************************************************************/
include "_head.php";

if(!eregi($HTTP_HOST,$HTTP_REFERER)) die();

/***************************************************************************
* 게시판 설정 체크
**************************************************************************/

// 사용권한 체크
if($setup[grant_view]<$member[level]&&!$is_admin) Error("사용권한이 없습니다","login.php?id=$id&page=$page&page_num=$page_num&category=$category&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&file=zboard.php");

// 현재글의 Download 수를 올림;;
mysql_query("update $t_board"."_$id set download".$filenum."=download".$filenum."+1 where no='$no'");

$data=mysql_fetch_array(mysql_query("select * from $t_board"."_$id where no='$no'"));

// 다운로드;;
$filename="file_name".$filenum;
$filename2="s_".$filename;

$filedir= $data[$filename];
$fileN= $data[$filename2];
if(strstr($HTTP_USER_AGENT, "MSIE 5.5")) { 
header("Content-Type: doesn/matter"); 
header("Content-Disposition: filename=$fileN"); 
header("Content-Transfer-Encoding: binary"); 
header("Pragma: no-cache"); 
header("Expires: 0"); 

else { 
Header("Content-type: file/unknown"); 
Header("Content-Disposition: attachment; filename=$fileN"); 
Header("Content-Description: PHP3 Generated Data"); 
header("Pragma: no-cache"); 
header("Expires: 0"); 


if (is_file("$filedir")) { 
$fp = fopen("$filedir", "r"); 
if($connect) {
@mysql_close($connect);
unset($connect);
}
if (!fpassthru($fp)) 
fclose($fp); 

?>

이렇게 바꿔주시면 어떤파일이든 무조건 다운로드 창이 뜨게 된답니다.
 


  피시키드
회원님의 소개글이 없습니다.
 6490
 83

피시키드
 6490
 83
http://www.dma.kr/dma/zb41pl8/view.php?id=prg&page=3&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=hit&desc=asc&no=7  
(2019-10-15 17:53:27)

자바소스 난독화
sketch for ppt

Copyright (C) 1997-2025 All Rights Reserved.

Powered by
DNS server, DNS service 우분투 리눅스 웹서비스 AbuseIPDB Contributor Badge