Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ÖеÄÑ­»·Óï¾äÓÃÓÚÖ´ÐÐÏàͬµÄ´úÂë¿éÖ¸¶¨µÄ´ÎÊý¡£
Ñ­»·
ÔÚÄú±àд´úÂëʱ£¬Äú¾­³£ÐèÒªÈÃÏàͬµÄ´úÂë¿éÔËÐкܶà´Î¡£Äú¿ÉÒÔÔÚ´úÂëÖÐʹÓÃÑ­»·Óï¾äÀ´Íê³ÉÕâ¸öÈÎÎñ¡£
ÔÚ PHP ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃÏÂÁÐÑ­»·Óï¾ä£º
while Ö»ÒªÖ¸¶¨µÄÌõ¼þ³ÉÁ¢£¬ÔòÑ­»·Ö´ÐдúÂë¿é do...while Ê×ÏÈÖ´ÐÐÒ»´Î´úÂë¿é£¬È»ºóÔÚÖ¸¶¨µÄÌõ¼þ³ÉÁ¢Ê±Öظ´Õâ¸öÑ­» ......

php mysql ÅäÖÃphp.ini

Îļþphp.ini·ÅÈëwindowsÏ£¬½«ÏÂÃæÄÚÈÝ¿½±´µ½¼Çʱ¾ÃüÃûΪphp.ini·ÅÈëc:/windowsÏÂ,ÖØÆôApache server£º
[PHP]
;;;;;;;;;;;
; WARNING ;
;;;;;;;;;;;
; This is the default settings file for new PHP installations.
; By default, PHP installs itself with a configuration suitable for
; development purposes ......

·ÖÎöPHPµÄob_start()


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

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


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

PHP ArrayʵÓú¯Êý²Î¿¼

array_flip
½»»»Êý×éÖеļüºÍÖµ
$arr1 = array('a'=>1,'b'=>2,'c'=>3,'d'=>4);
$array = array_flip($arr1);
showArr($array);
/*
Array
(
[1] => a
[2] => b
[3] => c
[4] => d
)
*/
array_key_exists
 
¼ì²é¸ø¶¨µÄ¼üÃû»òË÷ÒýÊÇ·ñ´æÔÚÓÚÊý×éÖÐ(Ò²¿ÉÓÃÓÚ¶ÔÏó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ