À¥È£½ºÆþ÷ü¸¦ ¹Ù²Ù°í ³ª¼ ÆÄÀÏ ´Ù¿î·Îµå°¡ ¾ÈµË´Ï´Ù
ÀÏ´Ü download.phpÆÄÀϳ»¿ëÀÔ´Ï´Ù
$downFile="../docFiles2/".$_GET['fileName']; $strSQL="SELECT * FROM docPds3 WHERE idx=".$idx." AND files LIKE '%".$_GET['fileName']."%'"; $result=mysql_query($strSQL); $rowNum=mysql_num_rows($result); if($rowNum==0){ echo" <script language=\"javascript\"> alert('Á¸ÀçÇÏÁö ¾Ê´Â ÆÄÀÏÀÔ´Ï´Ù.'); </script> "; exit; }else{
header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=".$_GET['fileName']); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".(string)(filesize($downFile))); header("Cache-Control: cache, must-revalidate"); header("Pragma: no-cache"); header("Expires: 0"); $fp = fopen($downFile,'r+b') ; if (!fpassthru($fp)) { fclose($fp); }
$strSQL="UPDATE docPds SET download=download+1 WHERE idx=".$idx; $result=mysql_query($strSQL); echo mysql_error();
}
¿©±â¼ ¾Æ¹«·± º¯È°¡ ¾ø½À´Ï´Ù. ±×¸®°í ¼¼ºÎ³»¿ëº¸±â¿¡¼ ÆÄÀÏ´Ù¿î·Îµå¸¦ ÇÏ°ÔµÇ¸é ´Ù¿î·Îµå°¡ µÇ±¸¿ä
±×°æ¿ì´Â ÇØ´çÆÄÀÏÀÌÀÖ´Â °æ·Î¸¦ ../docFiles2/aa.hwp ÀÌ·¸°Ô Á÷Á¢Ã£¾Æ°¡°Ô µÇ°Åµç¿ä
¿Ö ±×Àü ¼¹ö¿¡¼´Â µÆ´ø°ÍÀÌ È£½ºÆÃÀ» ¿Å±â°í ³ª¼´Â ¾ÈµÇ´Â °É±î¿ä? |