Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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;


Ïà¹ØÎĵµ£º

LinuxÏ php5 MySQL5 Apache2 °²×°ÓëÅäÖÃ


mkdir /downloads
chown -R root:root /downloads
chmod -R 774 /downloads
Ò»¡¢°²×°Apache2
    ÏÂÔصØÖ·£ºhttp://www.apache.org/ --> HTTP Server --> from a mirror
    1. »ñÈ¡mysqlÔ´Âë
        shell> cd /downloads
     ......

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


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

phpÉú³ÉÑéÖ¤ÂëͼƬ´úÂë

Îļþcheck.php
<?php
//Éú³ÉÑéÖ¤ÂëͼƬ
Header("Content-type: image/PNG");
srand((double)microtime()*1000000);//²¥ÏÂÒ»¸öÉú³ÉËæ»úÊý×ÖµÄÖÖ×Ó£¬ÒÔ·½±ãÏÂÃæËæ»úÊýÉú³ÉµÄʹÓÃ
session_start();//½«Ëæ»úÊý´æÈësessionÖÐ
$_SESSION['authnum']="";
$im = imagecreate(62,20); //Öƶ¨Í¼Æ¬±³¾°´óС
$black = ImageC ......

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


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

»ùÓÚPHPµÄÐÂWeb¿ª·¢¿ò¼Ü

±¾ÎÄת×Ô:http://www.msphome.cn/post/119/
    ×î½üÒòΪҪ¶ÔÒ»¸öÏîÄ¿½øÐÐÖع¹£¬ËùÒÔÒ»Ö±ÔÚÑо¿PHP¿ò¼Ü¡£´óÌå¿´ÁË¿´Zend Frameworks£¬×ÐϸѧϰÁËÏÂsymfony£¬·¢ÏÖÒ»¸öÁ¼ºÃµÄMVC Web¿ò¼Ü£¬×ãÒԸı俪·¢Ï°¹ß¡£µ«ÊÇÎÞÂÛÊÇZend Frameworks»¹ÊÇsymfony£¬¶ÔÓÚÖÐСÐÍÏîÄ¿µÄ¿ª·¢À´Ëµ¶¼¹ýÓÚÓ·Ö×£¬²¢²»ÄܺܺõÄÌáÉý¿ª· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ