|
|
Ŭ¶ó¿ìµåű×
javascript PHP ASP CSS mysql html jquery ������ image mobile API slide °Ô½ÃÆÇ
|
|
ÇöÀçÁ¢¼ÓÀÚ ¸í |
|
|
|
|
|
|
130 |
| |
3,334 |
| |
2005-02-21 13:24:26 |
|
|
|
´Ð³×ÀÓ
|
HappyCGI |
À̸ÞÀÏ
|
webmaster@happycgi.com |
Á¦¸ñ
|
[´äº¯] [Áú¹®]Æû¸ÞÀÏ¿¡¼ ÆÄÀÏ÷ºÎÇÏ´Â ¹æ¹ýÁ» ¾Ë·ÁÁÖ¼¼¿ä |
³»¿ë
|
|
[kks2281´Ô ¿øº»±Û]
ÆÄÀÏ Ã·ºÎ Æû¸ÞÀÏÀ» ¸¸µé·Á°í ÇÕ´Ï´Ù.
ÆÄÀÏ Ã·ºÎÇÒ ¼ö ÀÖµµ·Ï php¸¦ ¼öÁ¤ÇؾßÇϴµ¥
¾î¶»°Ô ¼öÁ¤À» ÇؾßÇÏ´ÂÁö...
µµ¿òÀ» ÁÖ¼ÌÀ¸¸é ÇÕ´Ï´Ù. | ÇØÇÇCGI ÀÔ´Ï´Ù. ¾Æ·¡ ±¦ÂúÀº Äڵ带 ³Ö¾îµå¸³´Ï´Ù. Âü°íÇÏ½Ã¸é µÇ°Ú½À´Ï´Ù. ÆÄÀÏ÷ºÎ¸¦ ÀÌÇظ¦ ÇϽǷÁ¸é ½ÇÁ¦ ¹ÙÀ̳ʸ® ÆÄÀϵéÀ» ¸Þ¸ðÀåÀ̳ª editplus·Î ¿¾îº¸½Ã°í µ¿½Ã¿¡ php³ª perlÀ» ÀÌ¿ëÇؼ ÇØ´ç ÆÄÀÏÀÌ ¾î¶²½ÄÀ¸·Î »Ñ·ÁÁö´ÂÁö¸¦ ÀÌÇظ¦ ÇØ¾ß ÇÕ´Ï´Ù. ^^ Á÷Á¢ ÀÌÇØ°¡ ÇÊ¿ä¾øÀÌ Æû¸ÞÀϸ¸ ¸¸µé°íÀÚ ÇÏ½Ç °æ¿ì´Â ¾Æ·¡ Äڵ带 Âü°íÇϽʽÿÀ. [ÇÁ·Î±×·¥ÄÚµå]##################################################################### Âü°í·Î $content_r = "¸ÞÀϳ»¿ë" $upfile_name = "ÆÄÀÏÀ̸§" $file_size = "»çÀÌÁî" $file_type = "ÆÄÀÏŸÀÔ"
¸ÞÀÏ ¹Ì¸®º¸±â ÆäÀÌÁö¿¡¼ $_FILE['ÆÄÀϸí']['name'],$_FILE['ÆÄÀϸí']['size'], $_FILE['ÆÄÀϸí']['type']À¸·Î °ªÀ» ±¸ÇÏ°í Çö ÆäÀÌÁö¿¡¼´Â °ª¸¸ ¹ÞÀ½ => ¹Ì¸®º¸±â ÆäÀÌÁöÀÇ form¿¡ enctype="multipart/form-data" °¡ ÀÖÀ¸¸é ¾ÈµÇ°ÚÁö¿ä..^^; ´ç¾áÇÑ ¾ê±âµ¥ Çѹø Tj ºÃÀ¾´Ï´Ù.....^^;
ÇÏ´ÜÀÇ »¡°£»öÀ¸·Î µÈºÎºÐÀº ¸ÞÀÏ ¹Ì¸®º¸±â ÆäÀÌÁö¿¡¼ ¼¹ö¿¡ ÆÄÀÏÀ» ÀúÀåÇÏ°í ¿©±â¼´Â ÆÄÀÏÀ» ºÒ·¯ ¿Àµµ·Ï ¹Ù²åÀ¾´Ï´Ù. À̺κж§¹®¿¡ óÀ½¿¡´Â ÆÄÀÏÀÌ Ã·ºÎ°¡ ¾ÈµÇµå¶ó°í¿ä. ±×·³ Áñ°Å¿î ÇÁ·Î±×·¥ ÇϽʽÿä #####################################################################
//¢º ¸ÞÀÏ¿¡ ±¸ºÐÀÚ¸¦ »ý¼ºÇÔ. (part ·Î ½ÃÀÛÇÏ´Â À¯´ÏÅ©ÇÑ ¾ÆÀ̵𸦠»ý¼º) $boundary = "----".uniqid("part");
$header .= "Return-Path: ".$from."\r\n"; // ´äº¯, ¹Ý¼ÛµÉ À̸ÞÀÏÁÖ¼Ò $header .= "From: ".$from."\r\n"; // º¸³»´ÂÀÌ ÁÖ¼Ò $header .= "MIME-Version: 1.0\r\n"; // MIME ¹öÀü ¼³Á¤
//¢º À̸ÞÀÏ ³»¿ëÀÌ ¿©·¯ Á¾·ù·Î ÀÌ·ç¿ö Á³´Ù´Â °ÍÀ» ¾Ë¸²...±×¸®°í ±¸ºÐÀÚ¸¦ À§¿¡¼ »ý¼ºÇÑ ±¸ºÐÀÚ¸¦ »ç¿ëÇÑ´Ù°í ¾Ë¸² $header .= "Content-Type: Multipart/mixed; boundary = \"".$boundary."\"";
//¢º À̸ÞÀÏ ³»¿ë ÀÛ¼º ½ÃÀÛ...±¸ºÐÀÚ¸¦ ½ÃÀÛÀ¸·Î ¹®ÀÚ¼ÂÀ» Çѱ۷ΠÁöÁ¤ÇÏ°í base64 ¹æ½ÄÀ¸·Î ¾ÏÈ£È µÇ¾ú´Ù´Â °ÍÀ» ¾Ë¸² $mailbody .= "--".$boundary."\r\n"; $mailbody .= "Content-Type: text/html; charset=\"euc-kr\"\r\n"; $mailbody .= "Content-Transfer-Encoding: base64\r\n\r\n";
//¢º ½ÇÁ¦ ³»¿ëÀ» ¾ÏÈ£ÈÇؼ Ãß°¡ÇÔ... $mailbody .= base64_encode($content_r)."\r\n\r\n";
$save_dir = $_SERVER["DOCUMENT_ROOT"]."¾÷·ÎµåÇÑ ÆÄÀÏÀÌ ÀúÀåµÇ´Â °æ·Î";
if($upfile_name) {// ÷ºÎµÈ ÆÄÀÏÀÌ ÀÖÀ» °æ¿ì¸¸...
//¢º ÷ºÎ ÆÄÀÏ ¿ë·®ÀÌ À§¿¡¼ ÁöÁ¤ÇÑ $limit º¸´Ù Ŭ°æ¿ì ¿¡·¯¸¦ Ãâ·ÂÇÏ°í µÚ·Î À̵¿ÇÔ. if($file_size >= 2048000) { ?> <script language='javascript'> alert('¾÷·Îµå ÆÄÀÏÀÇ ¿ë·®ÀÌ ÃÖ´ë ¿ë·®[2MB]À» ÃÊ°úÇÕ´Ï´Ù.'); history.back(); </script> <? exit; } $filename = basename($upfile_name); // ÷ºÎÆÄÀÏ À̸§ ¼³Á¤
//¢º ÷ºÎ ÆÄÀÏÀ» ¿¾î¼ ³»¿ëÀ» $file ¿¡ ÀúÀåÇÔ <font color='red'>$file_loc = $save_dir."/".$upfile_name;</font> $fp = fopen($file_loc, "r"); $file = fread($fp, $file_size); fclose($fp);
//¢º ½ÇÁ¦ ÆÄÀÏ÷ºÎ...±¸ºÐÀÚ¸¦ ½ÃÀÛÀ¸·Î ÆÄÀÏÁ¾·ù¿Í À̸§ÀÇ Ãß°¡¿Í ÇÔ²² ÷ºÎÆÄÀÏÀ̶õ °ÍÀ» ¾Ë¸®°í ¸¶Áö¸·À¸·Î ½ÇÁ¦ ÆÄÀÏÀ» ¾ÏÈ£È ÇÏ¿© Ãß°¡ÇÔ. $mailbody .= "--".$boundary."\r\n"; $mailbody .= "Content-Type: ".$file_type."; name=\"".$filename."\"\r\n"; $mailbody .= "Content-Transfer-Encoding: base64\r\n"; $mailbody .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n"; $mailbody .= base64_encode($file)."\r\n\r\n"; }
switch($send_method){ case "M": break;
case "O": mail($mailto,$subject,$mailbody,$header); break; } ?>
<meta http-equiv="Refresh" content="0; URL=index.php">
<? exit; ?>
|
|
|
|
|
|
|
|
|
|
|
|