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
Ïà¹ØÎĵµ£º
ÔÚÎÒÃǵÄÍøÕ¾Éè¼Æ¹ý³ÌÖУ¬¾³£»áÓõ½¶àÌõ¼þ²éѯ£¬±¾ÎĵÄÔ´ÂëÊÇÒ»¸ö¶þÊÖ·¿ÎݲéѯµÄÀý×Ó¡£ÔÚ±¾ÀýÖУ¬ÎÒÃÇҪʵÏÖÄܹ»Í¨¹ýµØÀíλÖã¬ÎïÒµÀàÐÍ£¬·¿Îݼ۸ñ£¬·¿ÎÝÃæ»ý¼°ÐÅÏ¢·¢²¼ÈÕÆÚµÈ¶à¸öÌõ¼þ²éѯµ½¿Í»§ËùÐèµÄ×ÊÁÏ¡£
²éѯÎļþ£¨search.php£©
Ò»¡¢Éú³É²éѯÓï¾ä£º
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
<?
$conn=mysql_connect("localhost", ......
PHPÓëJS---È¡ÕûÊý·½·¨int,celi,floor,round
1.¶ªÆúСÊý²¿·Ö,±£ÁôÕûÊý²¿·Ö
php: intval(7/2)
js:parseInt(7/2)
2.ÏòÉÏÈ¡Õû,ÓÐСÊý¾ÍÕûÊý²¿·Ö¼Ó1
php: ceil(7/2)
js: Math.ceil(7/2)
3,ËÄÉáÎåÈë.
php: round(7/2)
js: Math.round(7/2)
4,ÏòÏÂÈ¡Õû
php: floor(7/2)
js: Math.floor(7/2)
ÒÔÉÏת×Ô:http://hi.baidu ......
½ü
À´Ëæ×Åi18n(¹ú¼Ê»¯)µÄÖð½¥±ê×¼»¯£¬ÎÒÒ²À´½²Ò»½²ÔÚPHPÖÐÈçºÎʵÏÖ¹ú¼Ê»¯Ö§³Ö¡£¸úÆäËû³ÌÐòÓïÑÔÒ»Ñù£¬ÔÚ PHP Ò²¿ÉÒÔÀûÓà gettext
Ì×¼þд×÷ i18n ³ÌÐò£¬ÊµÏÖ NLS(Native Language Support) ¹ú¼Ê»¯Ö§³Ö£¬¾ßÌåÇë²Î¿¼¹Ù·½Îĵµ(
http://www.gnu.org/software/gettext/manual/gettext.html
)
ÕâÀïÎÒÃÇÖ÷Òª½éÉÜwindowƽ̨ÏÂÊ ......
Ò»¡¢PHP SESSIONÔÀí
ÎÒÃÇÖªµÀ£¬sessionÊÇÔÚ·þÎñÆ÷¶Ë±£³ÖÓû§»á»°Êý¾ÝµÄÒ»ÖÖ·½·¨£¬¶ÔÓ¦µÄcookieÊÇÔÚ¿Í»§¶Ë±£³ÖÓû§Êý¾Ý¡£HTTPÐÒéÊÇÒ»ÖÖÎÞ״̬ÐÒ飬·þ
ÎñÆ÷ÏìÓ¦ÍêÖ®ºó¾ÍʧȥÁËÓëä¯ÀÀÆ÷µÄÁªÏµ£¬×îÔ磬Netscape½«cookieÒýÈëä¯ÀÀÆ÷£¬Ê¹µÃÊý¾Ý¿ÉÒÔ¿Í»§¶Ë¿çÒ³Ãæ½»»»£¬ÄÇô·þÎñÆ÷ÊÇÈçºÎ¼ÇסÖÚ¶àÓû§
µÄ»á»°Êý¾ÝÄØ£¿
Ê×ÏÈÒª ......