php mail - PHP / »ù´¡±à³Ì
ÎÒ×î½üдÁ˸ömailÖ´ÐкóûÓгöÏÖ´íÎóÐÅÏ¢Ö´ÐÐÍê±ÏºóÓÊÏäÀﲢû·¢ËÍÓʼþ£¬Çë¸÷λ°ïÎÒ¿´¿´
ÎÒÓõĵÄÊÇiis smtp
<?php
$to = 'xueyuxia1988@sohu.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'from: xueyuxia1988@gmail.com' . "\r\n" .
'Reply-To:xueyuxia1988@gmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
½¨ÒéʹÓÃphp×öµÄsmtpÈ¥×ömail,
google: php smtp
mailº¯ÊýʹÓÃʱPHPÐèÒªÒÑ°²×°ÇÒÕýÔÚÔËÐеÄÓʼþϵͳ¡£
ҪʹÓõijÌÐòÊÇÓÉ php.ini ÎļþÖеÄÅäÖÃÉèÖö¨ÒåµÄ¡£
php.iniÖÐSMTP £¬smtp_port £¬sendmail_from¶¼ÅäÖúÃÁËÂð£¿
ÕâЩÎÒ¶¼×ö¹ý£¬ÊÇ·þÎñÆ÷ÉÏûװsmtp£¬ÒѾ×Ô¼º½â¾ö
Ïà¹ØÎÊ´ð£º
Ôڲɼ¯Ò»¸öÒ³ÃæµÄʱºòͨ³£¶¼ÊÇʹÓÃfile_get_contents($url)
²»¹ý·µ»ØµÄ½á¹ûÓÐʱºò»á²»È«
Èç¹ûÔÚhtmlÖÐʹÓà document.ready,ÔÚÒ³Ãæ×¼±¸ºÃºó£¬Ê¹ÓÃajax¶ÁÈ¡±ðÒ»²¿·ÖµÄÊý¾Ý
ÔÙͨ¹ýÐÞ¸Ähtml±êÇ©µÄÄÚÈÝ£¬¾Í²¿·ÖµÄÊý¾Ý¾ ......
index.phpÄÚÈÝ£º
$smarty->assign('name',strtotime('-0'));
$smarty->display("index.html");
index.htmlÄÚÈÝ£º
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......
ÈçÉÏËùʾ£¬Èç¹ûÎÒ¶¨ÒåÁËÒ»¸ölayout()º¯Êý£¬ÎÒµ÷ÓÃʱÓвÎÊýÔÙcontent£¬ÎÒÏëÔÚlayoutº¯ÊýÀïÃ沶׽contentÕâ¸ö²ÎÊý£¬ÄÜ·ñ×öµ½£¿¼´ÎÒÔÚlayoutº¯ÊýÄÜÊä³öcontentÕ⼸¸ö×Öĸ£¬±ÈÈçphpµÄ__get($name)º¯Êý£¬µ±ÎÒÔÚÀàÖв¢Î´¶¨ ......
Fatal error: Call to undefined function language_attributes() in C:\xampp\htdocs\header.php on line 2
´íÎóÖÐ˵µÄ·½·¨Ã»Óж¨Òå ÊÇʲôÔÒò£¿
php¸ßÊÖÃÇÄÜ°ï°ïÎÒÂð£¿
ÓпÉÄÜÄãËùÓõÄÒ»¸ö·½·¨»òÕßÊôÐÔÊÇÊôÓÚ ......