고맙습니다.
점을 하나 잘못찍었습니다.
감사합니다. ^^
>---------- 아래부터는 원본글입니다 ----------
저는 늙은 초보자인데요,회원가입도 안하고 질문드려도 되는지 모르겠습니다.
제로보드스킨게시판에서 음악감상스킨을 다운받아 설치한후
대우님께서 지시하는데로 download.php를 수정했는데
어디를 잘못 했는지 내 홈피에서는 다운로드가 않됩니다.
확인하시고 고치는 방법을 가르켜주시면 고맙겠습니다.
다운을 클릭하면 대상파일이 다룬로드가 되는게 아니라
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;
$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-Descripion: 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);
}
?>
점을 하나 잘못찍었습니다.
감사합니다. ^^
>---------- 아래부터는 원본글입니다 ----------
저는 늙은 초보자인데요,회원가입도 안하고 질문드려도 되는지 모르겠습니다.
제로보드스킨게시판에서 음악감상스킨을 다운받아 설치한후
대우님께서 지시하는데로 download.php를 수정했는데
어디를 잘못 했는지 내 홈피에서는 다운로드가 않됩니다.
확인하시고 고치는 방법을 가르켜주시면 고맙겠습니다.
다운을 클릭하면 대상파일이 다룬로드가 되는게 아니라
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;
$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-Descripion: 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);
}
?>
그런 작은 점 하나의 차이가 사이트 전체를 사용하지 못하게 만들만큼 위력이 크답니다.
항상 주의해서 보세요