ÅäÖÃphp×Ô´øµÄmail¹¦ÄÜ
֮ǰŪphpµÄʱºò£¬ÐèÒªÂ¼ÖÆÆÁÄ»£¬¾ÍÊÇÓÃphp×Ô´øµÄemailº¯Êý·¢ÐÅ£¬ÒòΪûÓÐ×Ô¼ºÅª¹ýsmtpµÄ ·þÎñÆ÷£¬ÍøÉÏÌṩµÄsmtp·þÎñÆ÷¶¼ÊÇÐèҪʹÓÃÃÜÂëÈÏÖ¤ µÄ£¬Æ«Æ«phpÄÚÖõĺ¯Êý¾ÍûÓÐÌṩÉí·ÝÈÏÖ¤£¬Ò²¾Íµ¼ÖÂÁ˱ØÐëÐèÒªÔÚ×Ô¼ºµÄµçÄԴһ¸ö¿ÉÒÔ×ÔÖ÷·¢ÐŵÄmail·þÎñÆ÷£¡
È»ºó¾Í²»¶ÏµÄ°Ù¶Ègoogle£¬ÒòΪ×Ô¼ºÃ»ÓйâÇý£¬ËùÓоÍûÓÐÅäÖÃ΢Èí×Ô´øµÄsmtp·þÎñ£¬Ö»ÄÜÊÇÉÏÍøÕÒÄÇÖÖרÃÅ·¢ÐŵÄÈí¼þ£¬¸Õ¿ªÊ¼ÕÒµÄÊÇwebmail£¬µ«ÊDz»ÖªµÀÔõôÅäÖã¬Õâ·½ÃæÍøÉϽéÉܵIJ»¶à£¬ËùÒÔ·ÅÆúÁË£¬Ö±µ½Ëѵ½Ò»Î»ÍøÉϸçÃÇ·ÖÏíµÄ
===========ÓÃwinwebmailÅäÖÃphp×Ô´øµÄmail¹¦ÄÜ
mail()ÊÇPHP×Ô´øµÄÒ»¸öʹÓÃSMTP·þÎñ·¢ËÍÓʼþµÄº¯Êý£¬ÏÂÃæÊÇÕâ¸öº¯ÊýµÄÔÐÍ[color=#007700]
[/color][code]mail(wvidc@qq.com, "ûÓÐÖ÷Ìâ", $message, "from: someone@cc5f.cn\nReply-To: reply@cc5f.cn\nX-Mailer: PHP/" . phpversion()); [/code]
ÉèÖúúó²âÊԻᱨ´í:[color=#ff0000]
SMTP server response: 554 failed MAIL from verification with the from field in message header.[/color]
×Ô¼º²âÊԵİ汾ÊÇPHP5.x £¬ÐèÒªÕâÑù²ÅÄÜ·¢Ëͳɹ¦,Ó¦¸ÃÊÇSMTP·þÎñÆ÷µÄÎÊÌ⣬
[code]mail(wvidc@qq.com, "ûÓÐÖ÷Ìâ", $message, phpversion()); [/code]
֮ǰÔÚÍøÉÏÕÒÁËÏ£¬phpºÍwinwebmail´îÅäµÄºÜÉÙ,¶øÇÒÓÃphp£¬¾Í²»ÄÜʹÓÃÆóÒµÓʾ֡£
ÎÒµÄwinwebmai°æ±¾ÊÇ3.7.6.X £¬ÅäÖÃÇé¿ö¶¼»¹ÊDz¶à£¬Ìí¼ÓÏàÓ¦µÄÓû§£¬
ÔÚÊÕ·¢¹æÔòÑ¡ÏÀïÔÚ½øÐмòµ¥µÄÉèÖÃ:(Ч¹ûͼ)
[attach]834[/attach]
ÔÚSMTPÑéÖ¤IPÀýÍâÀïÌîÉÏ×Ô¼ºµÄIP¡£
ÕâÑùPHP¾ÍÄÜÕý³£µÄÁ¬½Óµ½SMTP·þÎñÆ÷£¬ÓÖ²»»á¸ÉÈŵ½ÆäËûwebmailµÄÓû§¡£
php.iniµÄÉèÖÃ:
[code]
[mail function]
; For Win32 only.
SMTP = 222.***.**.***
smtp_port = 25
; For Win32 only.
sendmail_from = mail@cc5f.cn
;display_errors =Off
£»²âÊÔµÄʱºò×îºÃ¸ÄΪOn£¬»ØÏÔ´íÎó
[/code]
PHP²âÊÔ´úÂë:
[code]
<?php $to = 'wvidc@qq.com';
$subject = 'subject';
$message = 'hello';
$headers = phpversion();
if(mail($to, $subject, $message,$headers)){
echo "Ok.";
}else{
echo "Fail.";
}
?>
[/code]
[color=#ff0000]SMTP server response: 554 failed MAIL from verification with the from field in message header.[/color]
winwebmailÕâ¸ö´íÎóÐèÒª¹Ø±ÕÊÕ·
Ïà¹ØÎĵµ£º
ÕâÖÖÎÊÌâÎÒÏë´ó¼Ò¿ÉÄܶ¼Óöµ½¹ý£¬ÍøÓÑÌṩµÄ½â¾ö·½·¨Ò²ºÜ¶à¡£ÎÒÒ²Ö»ÊǽáºÏ×Ô¼ºÏµÍ³µÄÐèÇó²¢½áºÏÍøÓѵĽâ¾ö·½°¸À´×ܽáµÄÒ»ÖÖ·½·¨
ÓÃÀ´×÷Ϊ½â¾öphpÒÔrootȨÏÞÖ´ÐÐһЩÆÕͨÓû§²»ÄÜÖ´ÐеÄÃüÁî»òÓ¦ÓõIJο¼¡£
ÆäʵphpÀïµÄpopen()º¯ÊýÊÇ¿ÉÒÔ½â¾öÕâ¸öÎÊÌâµÄ£¬µ«ÊÇÓÉÓÚijЩ°æ±¾µÄlinux(ÈçÎÒʹÓõÄCentos 5)¶Ôϵͳ°²È«µÄ¿¼ÂÇ£¬
ʹ ......
ÅäÖû¹ÊǷdz£¼òµ¥µÄ£¬³ä·ÖÌåÏÖÁËnginxµÄÇ¿´óÓëÅäÖõļòµ¥^^ÏÂÃæÊÇ´óÖµķþÎñÆ÷½á¹¹Í¼£º
Ó¦ÓõÄ×îǰ¶ËÊÇһ̨nginx·þÎñÆ÷£¬ËùÓо²Ì¬µÄÄÚÈݶ¼ÓÉnginxÀ´´¦Àí£¬¶ø½«ËùÓÐphpµÄÇëÇó¶¼·Ö̯µ½ÏÂÓεÄÈô¸Ę́ÔËÐÐphp fastcgiÊØ»¤½ø³ÌµÄ·þÎñÆ÷ÖУ¬ÕâÑù¿ÉÒÔÒÔÒ»ÖÖÁ®¼ÛµÄ·½°¸À´ÊµÏÖ¶Ôϵͳ¸ºÔصķÖ̯£¬À©Õ¹ÏµÍ³µÄ¸ºÔØÄÜÁ¦¡£
Èý̨php fastc ......
HTML´úÂë
<form action="" method="post">
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="3"/>
<input name="ID_D ......
<?php
// An array of allowed users and their passwords
$users = array(
'harryf' => 'secret',
'tom' => 'mypwd'
);
// If there's no Authentication header, exit
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Basic real ......
ÕâЩÌìÏë×÷Ò»¸öÔÚÍøÕ¾ÖÐʵÏÖ²å¼þµÄ¹¦ÄÜ£¬¹È¸èÁËһϣ¬·¢ÏÖһƪÎÄÕ¸оõ¶ÔÎÒ°ïÖúºÜ´ó£¬Ìû³öÀ´ºÍ´ó¼Ò·ÖÏí£¬·Ï»°²»¶à˵£¬Ö±½ÓÌû³ö´úÂ빩´ó¼Ò·ÖÎö£º
Ê×ÏÈÊDzå¼þµÄ¹ÜÀíÀàµÄʵÏÖ£º
<?
/**
* STBLOG PluginManager Class
*
* ²å¼þ»úÖÆµÄʵÏÖºËÐÄÀà
*
* @package STBLOG
* @subpackage Libraries
* @ ......