Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

php×Ô¶¯·¢ËÍÓʼþ

Ê×ÏÈÀ´¸ö email.class.php Àࣺ
   <?php
class smtp
{
/* Public Variables */
var $smtp_port;
var $time_out;
var $host_name;
var $log_file;
var $relay_host;
var $debug;
var $auth;
var $user;
var $pass;
/* Private Variables */
var $sock;
/* Constractor */
function smtp($relay_host = "", $smtp_port = 25,$auth = false,$user,$pass)
{
$this->debug = FALSE;
$this->smtp_port = $smtp_port;
$this->relay_host = $relay_host;
$this->time_out = 30; //is used in fsockopen()
#
$this->auth = $auth;//auth
$this->user = $user;
$this->pass = $pass;
#
$this->host_name = "localhost"; //is used in HELO command
$this->log_file ="";
$this->sock = FALSE;
}
/* Main Function */
function sendmail($to, $from, $subject = "", $body = "", $mailtype, $cc = "", $bcc = "", $additional_headers = "")
{
$header="";
$mail_from = $this->get_address($this->strip_comment($from));
$body = ereg_replace("(^|(\r\n))(\\.)", "\\1.\\3", $body);
$header .= "MIME-Version:1.0\r\n";
if($mailtype=="HTML"){
$header .= "Content-Type:text/html\r\n";
}
$header .= "To: ".$to."\r\n";
if ($cc != "") {
$header .= "Cc: ".$cc."\r\n";
}
$header .= "from: $from<".$from.">\r\n";
$header .= "Subject: ".$subject."\r\n";
$header .= $additional_headers;
$header .= "Date: ".date("r")."\r\n";
$header .= "X-Mailer:By Redhat (PHP/".phpversion().")\r\n";
list($msec, $sec) = explode(" ", microtime());
$header .= "Message-ID: <".date("YmdHis", $sec).".".($msec*1000000).".".$mail_from.">\r\n";
$TO = explode(",", $this->strip_comment($to));
if ($cc != "") {
$TO = array_merge($TO, explode(",", $this->strip_comment($cc)));
}
if ($bcc != "") {
$TO = array_merge($TO, explode(",", $this->strip_comment($bcc)));
}
$sent = TRUE;
foreach ($TO as $rcpt_to) {
$rcpt_to = $this->get_address($rcpt_to);
if (!$this->smtp_sockopen($rcpt_to)) {
$this->log_write("Error: Cannot send email to ".$rcpt_to."\n");
$sent = FALSE;


Ïà¹ØÎĵµ£º

PHP»ñȡijÄêµÚ¼¸ÖܵÂÆðʼÖÕÖ¹ÈÕÆÚ

·ÀÖ¹ÒÔºóÍüµô£¬ÌùÔÚÕâ¶ùÀ²
 function GetWeekDate($week,$year)
 {
       $timestamp = mktime(0,0,0,1,1,$year);
       $dayofweek = date("w",$timestamp);
       if( $week != 1)
   &nb ......

PHPÍøÕ¾¿ª·¢·½°¸£¨¿ª·¢ÐÂÈ˱ضÁ£©


                 PHPÍøÕ¾¿ª·¢·½°¸£¨¿ª·¢ÐÂÈ˱ضÁ£©
Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ã濪·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. W ......

Guoqzhang_PHP ¼òÒ×php framework

Guoqzhang_PHP ¼òÒ×php framework    Çë¶àÖ¸µã¡£
Guoqzhang_PHP V 1.0 µÄPHP¿ª·¢¿ò¼Ü£¬²ÉÓÃMVCÉè¼Æģʽ£¬ÔËÓÃSmartyÄ£°åÒýÇæÊõºÍMySQLÊý¾Ý¿â¼¼Êõ¿ª·¢¶ø³É¡£
 Éè¼Æµ½¿ª·¢Íê³ÉºÄʱ20¸ö¹¤×÷ÈÕ×óÓÒ£¬Ê±¼ä¶Ì£¬¿ÉÄÜ´æÔÚһЩbug£¬Çë´ó¼ÒÖ¸Õý.×÷Õßmail£ºguoqzhang@gmail.com
url£ºhttp://download.csdn ......

PHP UUIDµÄÉú³ÉÔ´Âë

ÏÖÔںöàµØ·½¶¼ÓÃUUID£¬±ÈÈçÊý¾Ý¿âµÄ¸ö×Ô¶¯µÄUUID
UUID½á¹¹ÈçÏ£¨¶¼ÎªÊ®Áù½øÖÆ×Ö·û£©
XXXXX
XXX£­XXXX£­XXXX£­XXXX£­XXXXXXXXXXX
Ñо¿ÆäÉú³ÉʵÏÖ¹ý³Ì²Å·¢ÏÖ£¬Ô­À´ÊÇÕâÑùµÄ
1¡¢ÌáÈ¡µ±Ç°Ê±ºòÖµºÍʱ¼ä´Á
2¡¢°ÑÕâÁ½¸öֵת»»³ÉÊ®Áù½øÖÆ
3¡¢È¡Ê±¼äÖµºÍʱ¼ä´ÁµÄÇ°5ºÍʱ¼äÖµµÄÇ°Áùλ
4¡¢Éú³ÉÒ»¸öÈýλµÄÊ®Áù½øÖÆ£¬Èý¸öËÄλµÄ ......

ÈçºÎÌá¸ßPHPЧÂÊÓÅ»¯¡¾Ò»Ð©phpÄÚÖú¯ÊýµÄÃîÓá¿


[תÌù] Õ¥¸É PHP,²»µÃ²»×ªµÄһƪPHPʹÓü¼ÇÉ!
ÕâƪÔÓÎÄ·­ÒëÕûÀí×ÔÍøÂç¸÷·Îĵµ×ÊÁÏ(¼û×îÄ©µÄ²Î¿¼×ÊÁÏ)£¬ÓÈÆäÊÇ Ilia Alshanetsky (Åå·þÖ®ÖÁ) ÔÚ¶à¸ö PHP »áÒéÉϵÄÑݽ²£¬Ö÷ÒªÊǸ÷ÀàÌá¸ß PHP ÐÔÄܵļ¼ÇÉ¡£ÎªÇó¾«×¼£¬ºÜ¶à²¿·Ö¶¼ÓÐÏêϸµÄЧÂÊÊý¾Ý£¬ÒÔ¼°¶ÔÓ¦µÄ°æ±¾µÈµÈ¡£ÍµÀÁ£¬Êý¾Ý¾Í²»Ò»Ò»¸ø³öÁË£¬Ö±½Ó¸ø½áÂÛ£¬Èç¹ûÐèÒª¿´Ô­Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ