Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP mail Function With Attachments

Ô­ÌûµØÖ·£ºhttp://www.zedwood.com/article/126/php-mail-function-with-attachments
This code sends an html formatted email with attachments. This email sending script actually sends both a plaintext and an html body of the email, allowing the email client to choose which to display. The plaintext email is generated by stripping html tags from the html formatted body, and replacing 
with newline characters. 
One of the nice things about this script is that the attachments are stored in an array. If you want to add another attachment, all you have to do is copy and past an existing line in the attachment array, and change the filename. 
For each attachment, it automatically looks up the corresponding mimetype.
$file1='test.pdf';
$file2='test2.tar.gz';
$head = array(
       'to'      =>array('email@email.net'=>'Admin',
                         'email2@email.net'=>'Admin2'),
       'from'    =>array('cron@55.66.77.88' =>'CronAgent'),
       'cc'      =>array('email3@email.net'=>'Admin'),
       'bcc'     =>array('email4@email.net'=>'Admin'),
       );
$subject = date("Ymd")." Weekly Report";
$body ='';
$body.="<div style='font-family:Arial;font-size:10pt;'>";
$body.=    "<br>"."Admin,";
$body.=    "<br>"."";
$body.=    "<br>"."Attached are the files:";
$body.=    "<br>"."* ".$file1;
$body.=    "<br>"."* ".$file2;
$body.=&nbs


Ïà¹ØÎĵµ£º

PHPÓïÑÔµÄһЩȱÏÝ

1. ¶ÔµÝ¹éµÄ²»Á¼Ö§³Ö
µÝ¹éÊÇÒ»ÖÖº¯Êýµ÷ÓÃ×ÔÉíµÄ»úÖÆ¡£ÕâÊÇÒ»ÖÖÇ¿´óµÄÌØÐÔ¿ÉÒÔ°ÑijЩ¸´ÔӵĶ«Î÷±äµÃºÜ¼òµ¥¡£ÓÐÒ»¸öʹÓõݹéµÄÀý×ÓÊÇ¿ìËÙÅÅÐò£¨quicksort£©¡£²»ÐÒµÄÊÇ£¬PHP²¢²»Éó¤µÝ¹é¡£Zeev£¬Ò»¸öPHP¿ª·¢ÈËÔ±£¬ËµµÀ£º“PHP 4.0£¨Zend£©¶ÔÃܼ¯Êý¾ÝʹÓÃÁËÕ»·½Ê½£¬¶ø²»ÊÇʹÓöѷ½Ê½¡£Ò²¾ÍÊÇ˵ËüÄÜÈÝÈ̵ĵݹ麯ÊýµÄÊýÁ¿ÏÞ ......

PHP»º´æ¼¼ÊõÏê̸

Ò»¡¢ÒýÂÛ
PHP,Ò»ÃÅ×î½ü¼¸ÄêÐËÆðµÄwebÉè¼Æ½Å±¾ÓïÑÔ,ÓÉÓÚËüµÄÇ¿´óºÍ¿ÉÉìËõÐÔ,½ü¼¸ÄêÀ´µÃµ½³¤×ãµÄ·¢Õ¹,phpÏà±È´«Í³µÄaspÍøÕ¾,ÔÚËÙ¶ÈÉÏÓоø¶ÔµÄÓÅÊÆ,Ïëmssqlת6ÍòÌõÊý¾ÝphpÈçÐèÒª40Ãë,asp²»ÏÂ2·ÖÖÓ.µ«ÊÇ,ÓÉÓÚÍøÕ¾µÄÊý¾ÝÔ½À´Ô½¶à,ÎÒÃÇ¿ÊÇóÄܸü¿ìËٵĵ÷ÓÃÊý¾Ý,²»±ØҪÿ´Î¶¼´ÓÊý¾Ý¿âµô,ÎÒÃÇ¿ÉÒÔ´ÓÆäËûµÄµØ·½,±È·½Ò»¸öÎļþ,»òÕßij¸ ......

php»ñÈ¡xmlÊôÐÔÖµ

<!-- xml¸ñʽ
<foo xmlns="test">
<bar attr='a'></bar>
<bar attr='b'></bar>
<bar attr='c'></bar>
</foo>
-->
<?php
$dom = new DOMDocument();
if (!$dom->load('attr.xml'))
{
echo "load books.xml failed!<br>";
re ......

discuz ¾­µäphp¼ÓÃܽâÃܺ¯Êý authcode ½âÎö

¿µÊ¢µÄ authcode º¯Êý¿ÉÒÔ˵¶ÔÖйúµÄPHP½ç×÷³öÁËÖØ´ó¹±Ïס£°üÀ¨¿µÊ¢×Ô¼ºµÄ²úÆ·£¬ÒÔ¼°´ó²¿·ÖÖйúʹÓÃPHPµÄ¹«Ë¾¶¼ÓÃÕâ¸öº¯Êý½øÐмÓÃÜ£¬authcode ÊÇʹÓÃÒì»òÔËËã½øÐмÓÃܺͽâÃÜ¡£
Ô­ÀíÈçÏ£¬¼ÙÈ磺
¼ÓÃÜ
Ã÷ÎÄ£º1010 1001
Ãܳףº1110 0011
ÃÜÎÄ£º0100 1010
µÃ³öÃÜÎÄ0100 1010£¬½âÃÜÖ®ÐèºÍÃܳ×Òì»òϾͿÉÒÔÁË
½âÃÜ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ