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

PHPÄ£ÄâSMTP·¢ËÍÓʼþµÄÀà

 
PHPÄ£ÄâSMTP·¢ËÍÓʼþµÄÀà
 
<?php
/*********************************************************
 filename£ºmail.class.php
 describe£ºÓÊÏäµÄÅäÖ㬾­²âÊÔ¿ÉÒÔÊÊÓÃÓÚLinuxºÍwindows
 function£º¼ì²éÓÊÏäµÄºÏ·¨ÐÔ£¬·¢ËÍ»ù±¾µÄÓÊÏäÑéÖ¤ÐÅÏ¢
 author£º  etongchina@gmail.com
 time£º    2008-03-06 20:15
 checked£º 2008-03-11 01:03
*********************************************************/
class SEND_MAIL{
/* Public Variables */
 public $smtp_port;
 public $from;
 public $time_out;
 public $host_name;
 public $log_file;
 public $relay_host;
 public $debug;
 public $auth;//ÐèÒªauthÉí·ÝÑéÖ¤Âð?
 public $user;
 public $pass;
 private $sock;
  //¸øÀà±äÁ¿¸³Öµ ¶¨Òå¹¹ÔìÆ÷
   public function __construct($auth = FALSE)
  {
 $this->debug = FALSE;
 $this->relay_host = "smtp.163.com";//·þÎñÆ÷Ãû³Æ
 $this->smtp_port = 25;//·þÎñÆ÷¶Ë¿Ú ĬÈÏΪ25 yahoo.cnΪ465
 $this->time_out = 30; //is used in fsockopen() ĬÈÏ£º30s #
 $this->auth = $auth;
 $this->from = "zhoufeng0128@163.com
";
 $this->user = "zhoufeng0128";//ÓÊÏäÓû§Ãû
 $this->pass = "XXXX";        //ÓÊÏäÃÜÂë
 $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 = ""){ 
 $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-


Ïà¹ØÎĵµ£º

phpÖÐempty()£¬is_null()£¬isset()£¬boolÖ®¼äµÄÇø±ð


´ÓÕâ¸öͼÖУ¬¿ÉÒÔºÜÇå³þµÄ¿´µ½Ò»ÖÖÁªÏµ£º
¼ÙÉè $var ÊÇÈκÎtype¡£
µ± empty($var) Ϊ true ʱ£¬ (bool)($var) Ϊ false ¡£·´Ö®ÒàÈ»¡£
ͬÑù£¬
µ± is_null($var) Ϊ true ʱ£¬ isset($var) Ϊ false ¡£·´Ö®ÒàÈ»¡£
¼ÙÈç:
$i=$j+1;
ÕâÀïµÄis_null($j)Ϊtrue
¿É¼û£º
issetÓÃÓÚÅжÏ䶨ÒåµÄÇé¿ö¡£
Empty¿ÉÒÔÅжÏδ¶¨Ò ......

2009Äê9ÔÂÓïÑÔÅÅÐаñ£ºPHP³¬Ô½C++

TIOBEÊÀ½ç±à³ÌÓïÑÔÅÅÐаñÕ¹ÏÖÁ˱à³ÌÓïÑÔµÄÁ÷ÐÐÇ÷ÊÆ¡£Ã¿¸öÔ£¬¶¼ÓÐ×îеÄÊý¾Ý±»¸üС£Õâ·ÝÅÅÐаñµÄÊý¾ÝÈ¡ÑùÀ´Ô´ÓÚ»¥ÁªÍøÉϸ»Óо­ÑéµÄ³ÌÐòÔ±¡¢ÉÌ ÒµÓ¦Óá¢ÖøÃûµÄËÑË÷ÒýÇ棨ÖîÈç¹È¸è¡¢ MSN ¡¢ÑÅ»¢£©µÄ¹Ø¼ü×ÖÅÅÃû¡¢ Alexa ÉϵÄÅÅÃûµÈ¡£Çë×¢ÒâÕâ¸öÅÅÐаñÖ»ÊÇ·´Ó³ÁËij¸ö±à³ÌÓïÑÔµÄÈÈÃÅ³Ì¶È , Õâ²¢²»´ú±íËüÊÇÒ»¸ö×îºÃµÄ±à³ÌÓïÑÔ»òÊ ......

CookieÖдæÊý×é[php]

¿ÉÒÔͨ¹ýÐòÁл°Ò»¸öÊý×飬Ȼºó·Åµ½cookieÖÐ
´ÓcookieÖеõ½Öµ£¬È»ºóÔÚ·´ÐòÁл¯£¬×ª»»ÎªÊý×é¡£
$cur_goods_array = unserialize(stripslashes($_COOKIE['shop_cart_info']));
¡¡
¡¡setcookie("shop_cart_info",serialize($cur_goods_array)); ......

ÍƼö¼¸¿î¹úÄÚÓÅÐãµÄPHP¿ªÔ´½¨Õ¾³ÌÐò

¹úÍâµÄ¿ªÔ´¼¼ÊõÒ²Ó°ÏìºÍÍƶ¯Á˹úÄÚ¿ªÔ´³ÌÐòµÄ·¢Õ¹,¹úÍâÓÅÐ㿪ԴPHP½¨Õ¾³ÌÐòÒ»ÀÀÖÐ,ºÜ¶à¹úÍ⿪Դ³ÌÐò²¢²»Ì«·ûºÏÖйúÈ˵ÄʹÓÃÏ°¹ß,¶ø¹úÄÚÓÐһЩ³§¼Ò»ò¸öÈËÒ²×öÁËһЩ²»´íµÄ²úÆ·,²»ÉÙ³ÌÐòÊÇÌṩԴ´úÂëÏÂÔصÄ,ËäÈ»ÓÐЩÔÚÐí¿ÉЭÒéÉϺͿªÔ´Ðí¿ÉÖ¤ÓÐЩ³öÈë,µ«ÆäÔÚʹÓÃÉÏ»¹ÊÇͦ·ûºÏÖйúÈ˵ÄʹÓÃÏ°¹ß,½ñÌìÎҾͽéÉÜһЩ¹úÄÚµÄPHP&rdqu ......

redflag5.0°²×°Apache+MySQL+PHPʵ¼

LinuxÅäÖÃAPACHE2.2.4 + PHP5.2.1 + MYSQL5.0.37 + GD¿â
µÚÒ»²½£º°²×°RedFlag Linux5.0
°²×°ÏµÍ³Ê±ÇëÎñ±Ø°²×°¿ª·¢¹¤¾ß°üºÍKDE¿ª·¢¹¤¾ß°ü£¬WWW·þÎñÆ÷ºÍSQL·þÎñÆ÷²»Òª°²×°£¬·ñÔò¿ÉÄÜ»á³öÏÖδ֪µÄ´íÎó¡£
µÚ¶þ²½£ºÈ·¶¨linuxϵͳÊÇ·ñ°²×°gcc±àÒëÆ÷
Ê×ÏÈ,GCCÒªÓÐ,²»È»Ê²Ã´¶¼²»ÄÜ×ö.¿ÉÒÔÓÃgcc -vÀ´²é¿´ÊÇ·ñ°²×°ÁËGCC,
#gcc - ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ