파일다운로드 후엔 아무것도 안먹어요 -.-
팝업창을 뛰어서....
파일다운로드 후에 왜 다음 업데이트나 다른게 안먹죠???
다운로드 실행 줄 밑으로는 전부 되지 않아요
고수님들 좀 알려주세요...부탁드립니다...
<?
$dn = "1"; // 1 이면 다운 0 이면 브라우져가 인식하면 화면에 출력
$dn_yn = ($dn) ? "attachment" "inline";
$bin_txt = "1";
$bin_txt = ($bin_txt) ? "r" "rb";
$dnfile="$file";
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 ".(string)(filesize("$file")));
Header("Content-Disposition filename=$dnfile");
Header("Content-Transfer-Encoding binary");
Header("Pragma no-cache");
Header("Expires 0");
}
if(strstr($HTTP_USER_AGENT, "MSIE 5.0"))
{
Header("Content-type file/unknown");
header("Content-Disposition attachment; filename=$dnfile");
Header("Content-Description PHP3 Generated Data");
header("Pragma no-cache");
header("Expires 0");
}
if(strstr($HTTP_USER_AGENT, "MSIE 5.1"))
{
Header("Content-type file/unknown");
header("Content-Disposition attachment; filename=$dnfile");
Header("Content-Description PHP3 Generated Data");
header("Pragma no-cache");
header("Expires 0");
}
if(strstr($HTTP_USER_AGENT, "MSIE 6.0"))
{
Header("Content-type application/x-msdownload");
Header("Content-Length ".(string)(filesize("$file"))); // 이부부을 넣어 주어야지 다운로드 진행 상태가 표시
Header("Content-Disposition attachment; filename=$dnfile");
Header("Content-Transfer-Encoding binary");
Header("Pragma no-cache");
Header("Expires 0");
}
} else {
Header("Content-type file/unknown");
Header("Content-Length ".(string)(filesize("$file")));
Header("Content-Disposition $dn_yn; filename=$dnfile");
Header("Content-Description PHP3 Generated Data");
Header("Pragma no-cache");
Header("Expires 0");
}
if (is_file("$file")) {
$fp = fopen("$file", "rb");
if (!fpassthru($fp))
fclose($fp);
} else {
echo"
<script>
alert('해당 파일이나 경로가 존재하지 않습니다');
self.close();
</script>
";
exit;
}
include"../include/dbconn.php";
$update="update $tbl set down=down+1 where idx='$idx'";
$update=mysql_query($update);
?>
<script>
window.opener.location.reload();
self.close();
</script>
댓글 달기