ÇëÎÊÔõôÓÃphpµÄmailº¯Êý·¢ËÍÓʼþ?? - PHP / »ù´¡±à³Ì
ÎÒÓÃÒÔÏ´úÂë½øÐÐÁ˲âÊÔ,ÌáʾOK,µ«ÊÇûÓÐÊÕµ½Óʼþ,²»ÖªµÀÓÐËÖªµÀʲôÔÒò $to ="mymail@aa.com"; //²»ÊÇÕæµÄ,²âÊÔ $subject = "test"; $msg = "test"; $headers = "from:frommail@aa.com"; //²»ÊÇÕæµÄ,²âÊÔ if(mail("$to", "$subject", "$msg", "$headers")) echo "ok";// else echo "no";//
@ini_set("SMTP",$this->smtp["host"]); @ini_set("smtp_port",$this->smtp["port"]); @ini_set("sendmail_from",$this->smtp["from"]); ÒªÉèÖÃphp.iniÀïµÄÅäÖᣠһ°ãÊÇloaclhost£¬»¹Òª×¢Òâ·¢ËͶϿڲ»Òª±»ÆÁ±ÎÁË Â¥É쵀 ÄãÔõôɶ¶¼ÖªµÀ¡£¡£¡£ Äã²»µ±°ßÖñÌ«ÀË·ÑÁË ÅäÖÃÖÐÐ޸ĴúÀí. mail·µ»ØÕýÈ·£¬²»´ú±íÒѾ·¢ËͳöÈ¥¡£ÒýÓà @ini_set("SMTP",$this->smtp["host"]); @ini_set("smtp_port",$this->smtp["port"]); @ini_set("sendmail_from",$this->smtp["from"]); ÒªÉèÖÃphp.iniÀïµÄÅäÖᣠһ°ãÊÇloaclhost£¬»¹Òª×¢Òâ·¢ËͶϿڲ»Òª±»ÆÁ±ÎÁË ·Ç³£¸ÐлdingsongtaoµÄÈÈÐĻظ´,ÎÒ¿´ÁË,Äã˵µÄÉèÖÃÎÒÒѾÉèÖùýÁË. ÔÚphp.INIÀï [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. sendmail_from = frommail@aa.com //²»ÊÇÕæµÄ,²âÊÔ
Ïà¹ØÎÊ´ð£º
±±¾©2ÄêPHP¾ÑéÇó¼æÖ° ½Ó·Ö ·¹ý½Ó·Ö£¡.¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£ jf~~~~~~~~~~~~~~Ö§³Ö ßÀ¡£¡£ÎÒÃÇÐèÒª¼æÖ°£¬¿ÉÊÇÔõôÁªÏµÄãѽ£¿ ¶¥¡£¡£¡£ »Ø¸´ÄÚÈÝ »Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡ º¼ÖÝÄãÈ¥²»È¥°¡ ¡£¡£¡£¡£¡ ......
×î½üÒ»¸öÏîÄ¿ÖÐÓöµ½Ò»¸öÎÊÌ⣺ÔÚÔÓеÄÒ»Ì×ϵͳÖÐ(php¿ª·¢)Ìí¼ÓһЩС¹¦ÄÜ(jsp¿ª·¢)£¬ÔÀ´Óû§ÏµÍ³¶¼ÊÇphp¿ª·¢µÄ£¬ÎÒÈçºÎÔÚjsp¿ª·¢µÄ¹¦ÄÜÖÐ×öµ½Óû§ÐÅÏ¢sessionͬ²½ÄØ£¿ ÓÐÈËÊÇ·ñÓÐ×ö¹ýÀàÒÔÏîÄ¿£¬ÏëÌýÌý´ó¼ÒµÄ¿´·¨ ......
ÈçÌ⣬Ôõôд¸öheadÍ·²¿ ÈÃÒ³Ã滺´æ1ÐÇÆÚ¡£ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); Äã°ÑÀïÃæµÄʱ¼ä£¬¸Ä³Éµ±Ç°Ê±¼ä¼ÓÉÏÒ»¸öÐÇÆÚ ¼ÇµÃҪת»»³Égmtʱ¼ä ÎÒÕâÑùдµÄ ²»ÖªµÀÐв»ÐС£ Ò»¸öÐ ......
¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿ »òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿ PHP¸ÕÈëÃÅѧϰ,ÓÑÇ鶥һ¸ö ¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿ //echo '<script>alert("ok");< ......
ÊÇÓñðÈËдµÄÀà×öµÄ£¬»¹ÔʱÌáʾYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO admin(seq,passwd,type,n ......