ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î


÷ºÎ¸ÞÀÏ º¸³»±â
12³â Àü
<?php
$title = "÷ºÎ¸ÞÀÏ º¸³»±â";

$mailheaders     = "Return-Path: program@mytechnic.com\r\n";  
$mailheaders    .= "From: program@mytechnic.com\r\n";  
$mailheaders    .= "X-Mailer: multimail\r\n";  
$boundary        = "----".uniqid("part");



# ÷ºÎ ÆÄÀÏ Ã³¸®
$upfile            = $_FILES['upfile'];
$upfile_name    = $_FILES['upfile']['name'];
$upfile_tmpname    = $_FILES['upfile']['tmp_name'];
$upfile_size    = $_FILES['upfile']['size'];
$upfile_type    = $_FILES['upfile']['type'];

if($upfile_tmpname && $upfile_size) {  
    $filename = basename($upfile_name);  
    $fp = fopen($upfile_tmpname, "r");  
    $file_contents = fread($fp, $upfile_size);  
    fclose($fp);  
    if($upfile_type == "") {  
        $userfile_type = "application/octet-stream";  
    }

    // Çì´õ ÆÄÆ®¸¦ ÀÛ¼ºÇÑ´Ù.  
    // Multipart/mixed ÀÏ°æ¿ì ÷ºÎÆÄÀÏÀÌ ÀÖ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù.  
    $mailheaders .= "MIME-Version: 1.0\r\n";  
    $mailheaders .= "Content-Type: Multipart/mixed; boundary = \"$boundary\"";  

    // º»¹® ÆÄÆ®¸¦ ÀÛ¼ºÇÑ´Ù.  
    $bodytext = "This is a multi-part message in MIME format.\r\n\r\n";  
    $bodytext .= "--$boundary\r\n";  
    $bodytext .= "Content-Type: text/html; charset=EUC-KR\r\n";
    $bodytext .= "Content-Transfer-Encoding: base64\r\n\r\n";  
    $bodytext .= base64_encode($contents)."\r\n\r\n";  

    // ÆÄÀÏ÷ºÎ ÆÄÆ®¸¦ ÀÛ¼ºÇÑ´Ù.  
    $bodytext .= "--$boundary\r\n";  
    $bodytext .= "Content-Type: $upfile_type; name=\"$upfile_name\"\r\n";  
    $bodytext .= "Content-Transfer-Encoding: base64\r\n";  
    $bodytext .= "Content-Disposition: attachment; filename=\"$upfile_name\"\r\n\r\n";  
    $bodytext .= base64_encode($file_contents)."\r\n\r\n";  

    // ¸ÖƼÆÄÆ® Á¾·á¸¦ ÀÛ¼ºÇÑ´Ù.  
    $bodytext .= "--$boundary--";  
}
else {
    // Çì´õ ÆÄÆ®¸¦ ÀÛ¼ºÇÑ´Ù.  
    $mailheaders .= "MIME-Version: 1.0\r\n";  
    $mailheaders .= "Content-Type: Multipart/alternative; boundary = \"$boundary\"";  

    // º»¹® ÆÄÆ®¸¦ ÀÛ¼ºÇÑ´Ù.  
    $bodytext .= "--$boundary\r\n";  
    $bodytext .= "Content-Type: text/html; charset=\"ks_c_5601-1987\"\r\n";  
    $bodytext .= "Content-Transfer-Encoding: base64\r\n\r\n";  
    $bodytext .= base64_encode($contents)."\r\n\r\n";  

    // ¸ÖƼÆÄÆ® Á¾·á¸¦ ÀÛ¼ºÇÑ´Ù.  
    $bodytext .= "--$boundary--\r\n\r\n";  
}

$mailresult = mail("program@mytechnic.com", $title, $bodytext, $mailheaders);  
?>
ÃßõÃßõ : 698 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
2,225
ƯÁ¤ÇÑ ´ÞÀÇ »ýÀÏÀÎ »ç¶÷ ¸®½ºÆ® °¡Á®¿À±â
2,224
PHPÀÇ ¼ÒÄÏ ÇÔ¼ö
2,223
PHP¿Í AjaxÀ» ÀÌ¿ëÇؼ­ µ¥ÀÌÅÍ Ã³¸®Çϱâ
2,222
ÆÄÀÏÀ» ¹«Á¶°Ç ´Ù¿î·Îµå ½ÃÅ°±â
2,221
include()¿ë À¥°æ·Î -> »ó´ë°æ·Î º¯È¯ ÇÔ¼ö
2,220
ºü¸¥ ÇÁ·Î¼¼¼­¸¦ À§ÇÑ ÄÚµù½ºÅ¸ÀÏ
2,219
ȯ°æº¯¼ö ºÒ·¯¿À±â
2,218
À߸øµÈ PHP ÄÚµù ½ºÅ¸ÀÏ
2,217
¿¢¼¿(*.xls) È­ÀÏÀ» PHP¿¡¼­ Àбâ
2,216
ÆÄÀÏ ´Ù¿î·Îµå ÇÔ¼ö(¸ÖƼ À̾î¹Þ±â/¼ÓµµÁ¦ÇÑ)
2,215
Áֹεî·Ï ¹øÈ£·Î ³ªÀÌ ±¸Çϱâ
2,214
echo & print ºñ±³
2,213
½æ³×ÀÏ ¼Ò½º[GD »ç¿ë]
2,212
cURLÀ» ÀÌ¿ëÇÑ À¥ÆäÀÌÁö °¡Á®¿À±â
2,211
ÃÖ´ë°ø¾à¼ö ±¸Çϱâ (À¯Å¬¸®µå ¾Ë°í¸®Áò)
2,210
¼Ò¼öÀÎÁö È®ÀÎÇϱâ (À¯Å¬¸®µå ¾Ë°í¸®Áò)
2,209
PHP·Î HTTP ÀÎÁõÇϱâ
2,208
phpinfo Á¤º¸ - ¹Ì¸® Á¤ÀÇµÈ º¯¼ö
2,207
¹®ÀÚ¿­À» X·Î ¸¶Å·ÇÏ´Â ÇÔ¼ö
2,206
PHP¿¡¼­ ¼º´É °³¼±À» À§ÇÑ À¯¿ëÇÑ ÆÁ
2,205
ÆÄÀÏ ´Ù¿î·Îµå2 (Çì´õ ÀÌ¿ë)
2,204
ÀÚÁÖ ¾²ÀÌ´Â PHP ÇÔ¼ö
2,203
PHP5ÀÇ »õ·Î¿î ±â´É
2,202
ÀԷ¹ÞÀº IPÁÖ¼Ò¸¦ 127.0.¡Ù.1 ÇüÅ·Π¹Ù²Þ.
2,201
include(), require(), require_once() Â÷ÀÌÁ¡
2,200
DBÀÇ ¹«ÇÑÄ«Å×°í¸® °¡Á®¿À±â
2,199
¾î¶² °æ·Î·Î Çؼ­ ÀÌ È¨¿¡ ¿À°Ô µÆ´ÂÁö ¾Ë¾Æ³»´Â ¹æ¹ý
2,198
from ű×ÀÇ ÀÌÇØ
÷ºÎ¸ÞÀÏ º¸³»±â
2,196
Ç×»ó »õ·Î°íħ ÇØ´õ ¼³Á¤
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.