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

ת phpµÄÃæÊÔÌâ

תÔصÄPHPÃæÊÔÌâ
1. »ù±¾ÖªÊ¶µã
HTTPЭÒéÖм¸¸ö״̬ÂëµÄº¬Òå:503 500 401 200 301 302¡£¡£¡£
Include require include_once require_once µÄÇø±ð.
PHP/MysqlÖм¸¸ö°æ±¾µÄ½ø»¯Ê·£¬±ÈÈçmysql4.0µ½4.1£¬PHP 4.xµ½5.1µÄÖØ´ó¸Ä½øµÈµÈ¡£
HEREDOC½éÉÜ
д³öһЩphpħ»Ã·½·¨;
һЩ±àÒëphpʱµÄconfigure ²ÎÊý
Ïòphp´«Èë²ÎÊýµÄÁ½ÖÖ·½·¨¡£
(mysql)Çëд³öÊý¾ÝÀàÐÍ(int char varchar datetime text)µÄÒâ˼; ÇëÎÊvarcharºÍcharÓÐʲôÇø±ð;
error_reporting µÈµ÷ÊÔº¯ÊýʹÓÃ
ÄúÊÇ·ñÓùý°æ±¾¿ØÖÆÈí¼þ? Èç¹ûÓÐÄúÓõİ汾¿ØÖÆÈí¼þµÄÃû×ÖÊÇ?
posixºÍperl±ê×¼µÄÕýÔò±í´ïʽÇø±ð;
Safe_mode ´ò¿ªºóÄÄЩµØ·½ÊÜÏÞ.
д´úÂëÀ´½â¾ö¶à½ø³Ì/Ïß³Ìͬʱ¶Áдһ¸öÎļþµÄÎÊÌâ¡£
дһ¶ÎÉÏ´«ÎļþµÄ´úÂë¡£
Mysql µÄ´æ´¢ÒýÇæ,myisamºÍinnodbµÄÇø±ð¡£
 
2. web ¼Ü¹¹£¬°²È«,ÏîÄ¿¾­Ñé
½éÉÜxdebug,apc,eAccelerator,Xcache,Zend optµÄʹÓþ­Ñé¡£
ʹÓÃmod_rewrite,ÔÚ·þÎñÆ÷ÉÏûÓÐ/archivers/567.htmlÕâ¸öÎïÀíÎļþʱ£¬Öض¨Ïòµ½index.php?id=567 ,ÇëÏÈ´ò¿ªmod_rewrite.
MySQLÊý¾Ý¿â×÷·¢²¼ÏµÍ³µÄ´æ´¢£¬Ò»ÌìÎåÍòÌõÒÔÉϵÄÔöÁ¿£¬Ô¤¼ÆÔËάÈýÄê,ÔõôÓÅ»¯£¿
д³öÒ»ÖÖÅÅÐòËã·¨£¨Ô­Àí£©£¬²¢Ëµ³öÓÅ»¯ËüµÄ·½·¨¡£
Çë¼òµ¥²ûÊöÄú×îµÃÒâµÄ¿ª·¢Ö®×÷
¶ÔÓÚ´óÁ÷Á¿µÄÍøÕ¾,Äú²ÉÓÃʲôÑùµÄ·½·¨À´½â¾ö¸÷Ò³Ãæ·ÃÎÊÁ¿Í³¼ÆÎÊÌâ
ÄúÊÇ·ñÓùýÄ£°åÒýÇæ? Èç¹ûÓÐÄúÓõÄÄ£°åÒýÇæµÄÃû×ÖÊÇ?
Çë½éÉÜSessionµÄÔ­Àí,´óÐÍÍøÕ¾ÖÐSession·½ÃæӦעÒâʲô?
²âÊÔphpÐÔÄܺÍmysqlÊý¾Ý¿âÐÔÄܵŤ¾ß,ºÍÕÒ³öÆ¿¾±µÄ·½·¨¡£
ÕýÔòÌá³öÒ»¸öÍøÒ³ÖеÄËùÓÐÁ´½Ó.
½éÉÜһϳ£¼ûµÄSSO(µ¥µãµÇ½)·½°¸(±ÈÈçdedecmsÕûºÏdiscuzµÄpassport)µÄÔ­Àí¡£
Äúд¹ýµÄPHP¿ò¼ÜµÄÌص㣬Ö÷Òª½â¾öʲôÎÊÌ⣬ÓëÆäËû¿ò¼ÜµÄ²»Í¬µã¡£
´óÐ͵ÄÂÛ̳/ÐÂÎÅÎÄÕÂϵͳ/SNSÍøÕ¾ÔÚÐÔÄÜÓÅ»¯ÉÏÓÐʲôÇø±ð?
Ïà²áÀàÓ¦ÓÃ:ÒªÇóÔÚä¯ÀÀÆ÷ÖÐÄÜͬʱѡÖв¢ÉÏ´«¶à¸öÎļþ£¬Í¼Æ¬ÒªÇóÄܼô²Ã£¬Ñ¹Ëõ°üÔÚ·þÎñÆ÷¶Ë½âѹ¡£ÄÜÉÏ´«µ¥¸ö´ï50MµÄÎļþ¡£ÉÏ´«¹ý³ÌÖÐÓнø¶ÈÌõÏÔʾ¡£Ã¿¸öͼƬÄÜÉú³ÉËÄÖÖ´óСËõÂÔͼ£¬ÊÓƵÎļþҪת³Éflv¹©flash²¥·Å¡£ÐðÊöÒªÉæ¼°µÄ¸÷À࿪ԴÈí¼þºÍ¼òµ¥ÓÃ;¡£
һȺºï×ÓÅųÉһȦ£¬°´1£¬2£¬…£¬nÒÀ´Î±àºÅ¡£È»ºó´ÓµÚ1Ö»¿ªÊ¼Êý£¬Êýµ½µÚmÖ»,°ÑËüÌß³öȦ£¬´ÓËüºóÃæÔÙ¿ªÊ¼Êý£¬ÔÙÊýµ½µÚmÖ»£¬ÔÚ°ÑËüÌß³öÈ¥…£¬ Èç´Ë²»Í£µÄ½øÐÐÏÂÈ¥£¬Ö±µ½×îºóֻʣÏÂÒ»Ö»ºï×ÓΪֹ£¬ÄÇÖ»ºï×ӾͽÐ×ö´óÍõ¡£ÒªÇó±à³ÌÄ£Äâ´Ë¹ý³Ì£¬ÊäÈëm¡¢n, Êä³ö×îºóÄǸö´óÍõµ


Ïà¹ØÎĵµ£º

PHP×öºǫ́³ÌÐòµÄһЩÎÊÌâ

PHPµÄÓŵãÊǼòµ¥ÊµÓá£ÓÃËüÀ´Ð´Ò»Ð©½Å±¾£¬»òÕßÊÇwebservice¡¢Êý¾Ý¿âÀàµÄһЩ·ÃÎÊ£¬È·ÊµÊǺܼòµ¥·½±ã¡£
µ«ËüÓÐÒ»¸öºÜ´óµÄÎÊÌ⣬¾ÍÊÇÄÚ´æµÄ»ØÊÕÎÊÌâ¡£¸ù¾ÝʹÓõľ­Ñé¾õµÃÊǼ¸ºõÊÇûÓлØÊÕ¡£±ÈÈç½âÎöÒ»¸ö1°ÙÕ×µÄXMLÎļþ£¬ÄÚ´æʹÓÃÄܵ½1G¶à£¬¶øÇÒ»¹²»ÊÍ·Å¡£
ËùÒÔÓÃphpдºǫ́³ÌÐò£¬Ò»¶¨²»Òª×ö³ÉËÀÑ­»·µÄ£¬ÖÁÉÙÊǹýÒ»¶Îʱ¼äÍ˳ö ......

·ÖÎöPHPµÄob_start()


ÔÚPHP±à³ÌÖÐ, ÎÒÃǾ­³£»áÓöµ½Ò»Ð©Ö±½Ó²úÉúÊä³öµÄº¯Êý, Èçpassthru(),readfile(), var_dump() µÈ. µ«ÓÐʱÎÒÃÇÏë°ÑÕâЩº¯ÊýµÄÊä³öµ¼Èëµ½ÎļþÖÐ,»òÕßÏȾ­¹ý´¦ÀíÔÙÊä³ö, »òÕß°ÑÕâЩº¯ÊýµÄÊä³ö×÷Ϊ×Ö·û´®À´´¦Àí.
¡¡¡¡ÕâʱÎÒÃǾÍÒªÓõ½ Output Buffer(Êä³ö»º³å) º¯ÊýÁË.
´¦ÀíÊä³ö»º³åµÄº¯ÊýÖ÷ÒªÓÐÕâô¼¸¸ö:
ob_start() ¿ªÊ¼Ê ......

Windows XPϼòµ¥ÅäÖñ¾»úPHPµ÷ÊÔ»·¾³


×÷ΪʵÏÖ¶¯Ì¬ÍøÕ¾µÄ¹¤¾ßÖ®Ò»£¬PHPÒÔÆäÓï·¨¼òµ¥¡¢¸ßЧ¿ìËٺͶÔÊý¾Ý¿âµÄ¹ã·ºÖ§³Ö¶øÉîÊÜÓû§»¶Ó­¡£±àдPHP³ÌÐòºÍASPÒ»ÑùÐèÒªÔÚ±¾»úµ÷ÊÔ£¬Îª´ËÐèÒªÅäÖÃһϵ÷ÊÔ»·¾³¡£
Óкܶ෽°¸¿ÉÒÔÑ¡Ôñ£¬ÕâÀïÌṩÁ½ÖÖ½ÏΪ¼òÒ׵ķ½·¨¡£
²»¹ÜÊÇÄÄÖÖ·½·¨£¬¶¼ÐèÒª°²×°PHP¡£Èç¹ûÄãÊÇPHPʹÓÃÕߣ¬Äã¿ÉÄÜÔÚÍøÉÏÕÒ¹ýPHPµÄ°²×°×ÊѶ£¬ËüÃǼ¸ºõ¶¼ËµµÄ ......

ÔÚDreamweaver+WampServer µ÷ÊÔPHP³ÌÐò

°²×°WAPMServ5.2.6ºó,ÓÃDreamweaver¿ÉÒÔ±àдºÍµ÷ÊÔPHP
Ê×ÏÈ£ºÒªÏÈÆôwapmserver,Æô¶¯ËùÓзþÎñ
È»ºó £ºÔÚDreamweaverÅäÖÃÕ¾µã£¬¾ßÌå²Ù×÷ÈçÏ£º
ÃèÊöϹؼüµÄ²½Ö裺
Ïȵý¨¸öÕ¾µã È»ºó
¸ß¼¶ Ñ¡Ï£º
·ÖÀࣺ±¾µØÐÅÏ¢
±¾µØ¸ùÎļþ¼Ð £¨Ñ¡ÔñPHPµÄ·¢²¼Îļþ¼Ð£©
Á´½ÓÏà¶ÔÓÚ Õ¾µã¸ùĿ¼
HTTPµØÖ· Http://localhost/
»º´æ Æ ......

PHPÖÐÅ׿ªcookieʹÓÃsession

ÔÚPHPÖÐʹÓùýSESSIONµÄÅóÓÑ¿ÉÄÜ»áÅöµ½Õâôһ¸öÎÊÌ⣬ÔÚijЩ¿Í»§¶ËµçÄÔÉÏSESSION±äÁ¿²»ÄÜ¿çÒ³´«µÝ¡£ÕâÁîÎÒ¿àÄÕÁ˺ÃЩÈÕ×Ó£¬×îÖÕͨ¹ý²é×ÊÁÏ˼¿¼²¢½â¾öÁËÕâ¸öÎÊÌâ¡£ÎÒÈÏΪ£¬³öÏÖÕâ¸öÎÊÌâµÄÔ­ÒòÓÐÒÔϼ¸µã£º
1¡¢¿Í»§¶Ë½ûÓÃÁËcookie
2¡¢ä¯ÀÀÆ÷³öÏÖÎÊÌ⣬ÔÝʱÎÞ·¨´æÈ¡cookie
3¡¢php.iniÖеÄsession.use_trans_sid = 0»òÕß±àÒë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ