phpÖз¢ËÍÓʼþµÄ·½·¨
phpÖÐÓÐÁ½ÖÖ·½·¨£º
1£¬Í¨¹ýmail()º¯Êý·¢ËÍ
2£¬Socket·¢ËÍÓʼþ
Ò»£¬Í¨¹ýmail()º¯Êý·¢ËÍ£º
1£¬ÐèÒªÅäÖÃphp.iniÓʼþÐÅÏ¢
´ò¿ªphp.iniÅäÖÃÎļþ£¬ÅäÖúìÉ«µÄλÖÃ
; For Win32 only.
SMTP = localhost ---Èç¹û±¾»ú×°ÁËsendmail£¬Õâ¸ö±íʾʹÓñ¾µØÓʼþ·þÎñÆ÷£¬Ò²¿ÉÒÔÊÇipµØÖ·£¬»¹ÓзþÎñÆ÷ÓòÃû
smtp_port = 25 ---¶Ë¿ÚºÅ
; For Win32 only.
;sendmail_from = me@example.com ---¿Éд¿É²»Ð´
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = ----Óʼþ·þÎñÆ÷µÄ·¾¶
ÒòΪÅäÖý϶࣬ËùÒÔÒÆÖ²ÐÔ²î
2£¬ ÐèÒªÀàËÆsendmailÕâÑùµÄ×é¼þÖ§³Ö
3.mail()º¯Êý
mail()º¯ÊýÔÊÐí´Ó½Å±¾Ö±½Ó·¢Ë͵ç×ÓÓʼþ
mail()º¯Êý·µ»ØµÄÊÇbooleanÖµ£¬³É¹¦·µ»Øtrue£¬Ê§°Ü·µ»Øflase
mail(to,subject,message,headers,paeameters);
to --±ØÐ裬¹æ¶¨ÓʼþµÄ½ÓÊÕÕß
subject --±ØÐ裬¹æ¶¨ÓʼþµÄÖ÷Ì⣬¸Ã²ÎÊý²»ÄÜ°üº¬Èκλ»ÐÐ×Ö·û
Ïà¹ØÎĵµ£º
1. ¶ÔÓÚPHP magic_quotes_gpc=onµÄÇé¿ö£¬ ÎÒÃÇ¿ÉÒÔ²»¶ÔÊäÈëºÍÊä³öÊý¾Ý¿âµÄ×Ö·û´®Êý¾Ý×÷
addslashes()ºÍstripslashes()µÄ²Ù×÷,Êý¾ÝÒ²»áÕý³£ÏÔʾ¡£ Èç¹û´ËʱÄã¶ÔÊäÈëµÄÊý¾Ý×÷ÁËaddslashes()´¦Àí£¬
ÄÇôÔÚÊä³öµÄʱºò¾Í±ØÐëʹÓÃstripslashes()È¥µô¶àÓàµÄ·´Ð±¸Ü¡£ 2. ¶ÔÓÚPHP magic_quotes_gpc=off µÄÇé¿ö ±ØÐëÊ¹Ó ......
±¾ÎĽéÉܵĽű¾Ò×ÓÚÀí½â¡¢Ê¹Óüòµ¥²¢¿ÉÒÔ¿ìËÙÕÆÎÕ¡£
¼òµ¥µÄÖÀ÷»Æ÷
Ðí¶àÓÎÏ·ºÍÓÎϷϵͳ¶¼ÐèÒª÷»×Ó¡£ÈÃÎÒÃÇÏÈ´Ó¼òµ¥µÄ²¿·ÖÈëÊÖ£ºÖÀÒ»¸öÁùÃæ÷»×Ó¡£Êµ¼ÊÉÏ£¬¹ö¶¯Ò»¸öÁùÃæ÷»×Ó¾ÍÊÇ´Ó 1 µ½ 6 Ö®¼äÑ¡ÔñÒ»¸öËæ»úÊý×Ö¡£ÔÚ PHP ÖУ¬ÕâÊ®·Ö¼òµ¥£ºecho rand(1,6);¡£
ÔÚÐí¶àÇé¿öÏ£¬Õâ»ù±¾ÉϺܼòµ¥¡£µ«ÊÇÔÚ´¦Àí»úÂÊÓÎϷʱ£¬ÎÒÃÇÐèÒª ......
ÓÐͬѧÐèҪʹÓÃSSL+FTPµÄ·½Ê½¼ÓÃÜ´«ÊäÎļþ¡£Ï£ÍûÎÒ¸ø·â×°Ò»¸ö¶«Î÷£¬ÐèÇó¾ÍÊÇ¿ÉÒÔÉÏ´«Îļþ£¨PUT£©ºÍÔ¶¶Ë¸ÄÃû£¨RENAME£©¾ÍÐС£
ÎÒ¿ªÊ¼ÒÔΪSSL+FTP = SFTP£¬ºóÀ´·¢ÏÖÕâ¸öÏë·¨ºÃÏñÊÇ´íÎóµÄ¡£SFTPÊÇÅÜÔÚSSHÐÒéÉÏÃæµÄFTP£¬¶øFTPs¾ÍÏñhttpsÒ»ÑùÊÇÅÜÔÚSSLÐÒéÉÏÃæµÄFTP¡£
ʾÀý³ÌÐòʹÓÃÁËftp_ssl_connectº¯Êý¡£Ô´´úÂëÈçÏ£º
#! / ......
Apache¹Ù·½ÏÂÔصØÖ·£ºapache_2.0.55-win32-x86-no_ssl.msi£¬¸ü¶à°æ±¾ÔÚÕâÀ
php¹Ù·½ÏÂÔصØÖ·£ºphp-5.0.5-Win32.zip£¬¸ü¶à¾µÏñÏÂÔصØÖ·£¬¸ü¶à°æ±¾ÏÂÔØ£»
mysql¹Ù·½ÏÂÔصØÖ·£ºmysql-4.1.14-win32.zip£¬¸ü¶à¾µÏñÏÂÔصØÖ·£¬¸ü¶à°æ±¾ÏÂÔØ¡£
ApacheµÄÅäÖãº
ÎÒÒ»¿ªÊ¼Ôõô¸ã¶¼²»ºÃ£¬ÎÒÉÏÍøÕÒ£¬ÓеÄ˵ÊÇiisµÄÎÊÌ⣬ÓеÄ˵ÊÇ ......
<?php
/**
* ¸Ä±äͼƬµÄ¿í¸ß
*
* @author flynetcn (2009-12-16)
*
* @param string $img_src ÔͼƬµÄ´æ·ÅµØÖ·»òurl
* @param string $new_img_path ÐÂͼƬµÄ´æ·ÅµØÖ·
* @param int $new_width ÐÂͼƬµÄ¿í¶È
* @param int $new_height ÐÂͼƬµÄ¸ß¶È
* @return bool ³É¹¦true, ʧ°Üfalse
* ......