저는 늙은 초보자인데요,회원가입도 안하고 질문드려도 되는지 모르겠습니다.
제로보드스킨게시판에서 음악감상스킨을 다운받아 설치한후
대우님께서 지시하는데로 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);
}
?>
대부분이 설정에서 하나를 제대로 지키지 않아서 일어나는 문제입니다.
그리고 수정한 파일에 , (점) 하나라도 빠진게 있는지 확인해보세요
그리고 파일명은 항상 공백없이 영문이나 숫자를 사용하세요
FAQ 란도 보시고 검색도 해보시구요
그 이상을 도움을 드릴 수 없습니다.