PHP ·¢ËÍÓʼþ
PHP ·¢ËÍÓʼþ
×÷Õß:w3pop.com ·Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ÐÞ¸Ä:2007-06-17 ä¯ÀÀ:14208 :: ::
PHP Sessions
PHP allows you to send e-mails directly from a script.
PHPÔÊÐíÄãͨ¹ý½Å±¾Ö±½Ó·¢ËÍe-mail¡£
The PHP mail() Function
PHP mail()º¯Êý
The PHP mail() function is used to send emails from inside a script.
PHP mail()º¯Êý¿ÉÒԴӽű¾ÄÚ·¢ËÍemail¡£
Syntax
Óï·¨
mail(to,subject,message,headers,parameters)
Parameter
²ÎÊýDescription
ÃèÊö
to
Required. Specifies the receiver / receivers of the email
±ØÒª²ÎÊý¡£Ö¸¶¨emailµÄ½ÓÊÕÕß
subject
Required. Specifies the subject of the email. Note: This parameter cannot contain any newline characters
±ØÒª²ÎÊý¡£Ö¸³öemailµÄÖ÷Ìâ¡£×¢Ò⣺Õâ¸ö²ÎÊý°üº¬µÄ×Ö·û²»ÄÜ»»ÐУ¨Ö»ÄÜÏÔʾһÐУ©
message
Required. Defines the message to be sent. Each line should be separated with a LF (n). Lines should not exceed 70 characters
±ØÒª²ÎÊý¡£¶¨Òå·¢Ë͵ÄÐÅÏ¢¡£Ã¿Ðж¼±ØÐëÓã¨n£©·Ö¸ô¿ª¡£Ã¿Ðв»Äܳ¬¹ý70¸ö×Ö·û
headers
Optional. Specifies additional headers, like from, Cc, and Bcc. The additional headers should be separated with a CRLF (rn)
¿ÉÑ¡²ÎÊý¡£Ö¸¶¨¸½¼Ó±êÌ⣬È磺form¡¢Cc¼°Bcc¡£¸½¼Ó±êÌâͨ¹ý£¨rn£©½øÐзָô
parameters
Optional. Specifies an additional parameter to the sendmail program
¿ÉÑ¡²ÎÊý¡£¸øsendmail³ÌÐòÖ¸¶¨Ò»¸ö¸½¼Ó²ÎÊý
Note: For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file. Read more in our PHP Mail reference.
×¢Ò⣺PHPÐèÒª°²×°¡¢ÔËÐÐemailϵͳ²Å¿ÉÒÔʹÓÃmailº¯Êý¡£ËùʹÓõijÌÐòÊÇͨ¹ýphp.iniÎļþÖеÄÅäÖÃÊôÐÔÀ´È·¶¨µÄ¡£ÔĶÁ¸ü¶àµÄ¹ØÓÚPHP Mail²ÎÊý¡£
PHP Simple E-Mail
¼òÒ×µÄE-mail
The simplest way to send an email with PHP is to send a text email.
ʹÓÃPHP·¢ËÍÓʼþµÄ×î¼òµ¥µÄ·½·¨¾ÍÊÇ·¢ËÍÒ»¸öÎı¾¸ñʽµÄemail¡£
In the example below we first declare the variables ($to, $subject, $message, $from, $headers), then we use the variables in the mail() function to sen
Ïà¹ØÎĵµ£º
Ò»¡¢apache Ô´Âë°²×°
./configure --prefix=/usr/local/apache --enable-so
make
make install
×¢£º°²×°ºóÈç¹û¸Ä±äapacheÆðʼĿ¼(¹¤×÷Ŀ¼)£¬¿ÉÄÜ»á³öÏÖ403´íÎ󣬴ËʱÐÞ¸Ähttpd.confÖеÄUserºÍGroupΪÄã¸Ä±äºó
µÄÆðʼĿ¼ËùÊôµÄÓû§ºÍ×é¼´¿É£¡
ÈçrootÓû§° ......
Ò»´ÎNginx+PHP+MysqlµÄ²¢·¢²âÊÔ¾Àú
Ò»¡¢Ó²¼þ»·¾³
CPU:4ºËIntel(R) Xeon(R) CPU E5504 @ 2.00GHz
6GÄڴ棬120GÓ²ÅÌ
¶þ¡¢Èí¼þ»·¾³
L ......
PHPÊǸöΰ´óµÄweb¿ª·¢ÓïÑÔ£¬Áé»îµÄÓïÑÔ£¬µ«ÊÇ¿´µ½php³ÌÐòÔ±Öܶø¸´Ê¼µÄ·¸µÄһЩ´íÎó¡£ÎÒ×öÁËÏÂÃæÕâ¸öÁÐ±í£¬ÁгöÁËPHP³ÌÐòÔ±¾³£·¸µÄ10ÖдíÎ󣬴ó¶àÊýºÍ°²È«Ïà¹Ø¡£¿´¿´Äã·¸Á˼¸ÖÖ
1.²»×ªÒâhtml entities
Ò»¸ö»ù±¾µÄ³£Ê¶£ºËùÓв»¿ÉÐÅÈεÄÊäÈ루ÌرðÊÇÓû§´ÓformÖÐÌá½»µÄÊý¾Ý£© £¬Êä³ö֮ǰ¶¼Òª×ªÒâ¡£
ech ......
¹«Ë¾MMʱ³£¸øÎÒһЩºÅÂë,È»ÎÒ²éѯÊÇÄļҵÄ,¶¼ÊÇtxtÎı¾¸ñʽµÄ,»¹ºÃºÅÂëÊÇÒ»ÐÐÒ»¸ö,ÓÚÊÇÓÃfile()º¯ÊýÈ¡¸öÊý×é,¿ªÊ¼µÄʱºòÎÒµÄwin7 32λµÄ¿ÉÒÔÓÃapacheºóÀ´×°64λwin7ÓÉÓÚûÕÒµ½ÔÉúµÄ64λapacheÓÚÊǾʹ«µ½·þÎñÆ÷ÉÏÿ´Î,ÓÐÉÏ´«ÓиÃÎļþºÜÂé·³,ÓÚÊÇ×ö³ÉÒ»¸öÒ³ÃæÈ¥ÈÃMM×Ô¼ºÍê³É.·Ï»°²»¶à˵ ÒªÔÚform±íµ¥ÀïÉÏ´«Îļþ¾ÍµÃÐèÒªÔÚ±í ......
ÀûÓ÷ÉÐÅAPIʵÏÖ¹«Ë¾ÄÚ²¿·¢ËͶÌÐÅ¿ÉÒÔʡϲ»ÉÙÇ®.ÍøÉÏÒ²Óв»ÉÙ·ÉÐÅAPI,µ«¸Ð¾õ²»¿É¿¿,
»¹ÊÇ×Ô¼ºÐ´ÁËÒ»¸ö¼òµ¥µÄAPI.µ÷ÓõØÖ·ÈçÏÂ,²»»á¼Ç¼·ÉÐÅÃÜÂë.
ϲ»¶µÄÅóÓÑ¿ÉÒÔÊÔÊÔ,½áºÏAU3ÓÖдÁ˸öUDF.ÕâÏ·¢¶ÌÐÅ·½±ãºÜ¶àÁË.
http://lab.l4ever.cn/fetion/api/?from=·¢ËÍÊÖ»ú&pw=·ÉÐÅÃÜÂë&to=½ÓÊÕºÅÂë&msg=¶ÌÐÅÄÚÈ ......