Ìá¸ßPHP±à³ÌЧÂʵÄ53¸öÒªµã(2)
if (strlen($foo) < 5) { echo ¡°Foo is too short¡±$$ }£¨ÓëÏÂÃæµÄ¼¼ÇÉ×ö±È½Ï£©
if (!isset($foo{5})) { echo ¡°Foo is too short¡±$$ }µ÷ÓÃisset()Ç¡ÇɱÈstrlen()¿ì£¬ÒòΪÓëºóÕß²»Í¬µÄÊÇ£¬isset()×÷ΪһÖÖÓïÑԽṹ£¬Òâζ×ÅËüµÄÖ´Ðв»ÐèÒªº¯Êý²éÕÒºÍ×ÖĸСд»¯¡£Ò²¾ÍÊÇ˵£¬Êµ¼ÊÉÏÔÚ¼ìÑé×Ö·û´®³¤¶ÈµÄ¶¥²ã´úÂëÖÐÄãûÓл¨Ì«¶à¿ªÏú¡£
34¡¢µ±Ö´ÐбäÁ¿$iµÄµÝÔö»òµÝ¼õʱ£¬$i++»á±È++$iÂýһЩ¡£ÕâÖÖ²îÒìÊÇPHPÌØÓеģ¬²¢²»ÊÊÓÃÓÚÆäËûÓïÑÔ£¬ËùÒÔÇë²»ÒªÐÞ¸ÄÄãµÄC»òJava ´úÂë²¢Ö¸ÍûËüÃÇÄÜÁ¢¼´±ä¿ì£¬Ã»Óõġ£++$i¸ü¿ìÊÇÒòΪËüÖ»ÐèÒª3ÌõÖ¸Áî(opcodes)£¬$i++ÔòÐèÒª4ÌõÖ¸Áî¡£ºóÖõÝÔöʵ¼ÊÉÏ»á²úÉúÒ»¸öÁÙʱ±ä Á¿£¬Õâ¸öÁÙʱ±äÁ¿Ëæºó±»µÝÔö¡£¶øÇ°ÖõÝÔöÖ±½ÓÔÚÔÖµÉϵÝÔö¡£ÕâÊÇ×îÓÅ»¯´¦ÀíµÄÒ»ÖÖ£¬ÕýÈçZendµÄPHPÓÅ»¯Æ÷Ëù×÷µÄÄÇÑù¡£ÀμÇÕâ¸öÓÅ»¯´¦Àí²»Ê§ÎªÒ»¸öºÃ Ö÷Ò⣬ÒòΪ²¢²»ÊÇËùÓеÄÖ¸ÁîÓÅ»¯Æ÷¶¼»á×öͬÑùµÄÓÅ»¯´¦Àí£¬²¢ÇÒ´æÔÚ´óÁ¿Ã»ÓÐ×°ÅäÖ¸ÁîÓÅ»¯Æ÷µÄ»¥ÁªÍø·þÎñÌṩÉÌ£¨ISPs£©ºÍ·þÎñÆ÷¡£
35¡¢²¢²»ÊÇʱØÃæÏò¶ÔÏó(OOP)£¬ÃæÏò¶ÔÏóÍùÍù¿ªÏúºÜ´ó£¬Ã¿¸ö·½·¨ºÍ¶ÔÏóµ÷Óö¼»áÏûºÄºÜ¶àÄÚ´æ¡£
36¡¢²¢·ÇÒªÓÃÀàʵÏÖËùÓеÄÊý¾Ý½á¹¹£¬Êý×éÒ²ºÜÓÐÓá£
37¡¢²»Òª°Ñ·½·¨Ï¸·ÖµÃ¹ý¶à£¬×ÐϸÏëÏëÄãÕæÕý´òËãÖØÓõÄÊÇÄÄЩ´úÂ룿
38¡¢µ±ÄãÐèҪʱ£¬Äã×ÜÄÜ°Ñ´úÂë·Ö½â³É·½·¨¡£
39¡¢¾¡Á¿²ÉÓôóÁ¿µÄPHPÄÚÖú¯Êý¡£
40¡¢Èç¹ûÔÚ´úÂëÖдæÔÚ´óÁ¿ºÄʱµÄº¯Êý£¬Äã¿ÉÒÔ¿¼ÂÇÓÃCÀ©Õ¹µÄ·½Ê½ÊµÏÖËüÃÇ¡£
41¡¢ÆÀ¹À¼ìÑé(profile)ÄãµÄ´úÂë¡£¼ìÑéÆ÷»á¸æËßÄ㣬´úÂëµÄÄÄЩ²¿·ÖÏûºÄÁ˶àÉÙʱ¼ä¡£Xdebugµ÷ÊÔÆ÷°üº¬Á˼ìÑé³ÌÐò£¬ÆÀ¹À¼ìÑé×ÜÌåÉÏ¿ÉÒÔÏÔʾ³ö´úÂëµÄÆ¿¾±¡£
42¡¢mod_zip¿É×÷ΪApacheÄ£¿é£¬ÓÃÀ´¼´Ê±Ñ¹ËõÄãµÄÊý¾Ý£¬²¢¿ÉÈÃÊý¾Ý´«ÊäÁ¿½µµÍ80%¡£
43¡¢ÔÚ¿ÉÒÔÓÃfile_get_contentsÌæ´úfile¡¢fopen¡¢feof¡¢fgetsµÈϵÁз½·¨µÄÇé¿öÏ£¬¾¡Á¿Óà file_get_contents£¬ÒòΪËûµÄЧÂʸߵö࣡µ«ÊÇҪעÒâfile_get_contentsÔÚ´ò¿ªÒ»¸öURLÎļþʱºòµÄPHP°æ±¾ÎÊÌ⣻
44¡¢¾¡Á¿µÄÉÙ½øÐÐÎļþ²Ù×÷£¬ËäÈ»PHPµÄÎļþ²Ù×÷ЧÂÊÒ²²»µÍµÄ£»
45¡¢ÓÅ»¯Select SQLÓï¾ä£¬ÔÚ¿ÉÄܵÄÇé¿öϾ¡Á¿ÉٵĽøÐÐInsert¡¢Update²Ù×÷(ÔÚupdateÉÏ£¬ÎÒ±»¶ñÅú¹ý)£»
46¡¢¾¡¿ÉÄܵÄʹÓÃPHPÄÚ²¿º¯Êý£¨µ«ÊÇÎÒȴΪÁËÕÒ¸öPHPÀïÃæ²»´æÔڵĺ¯Êý£¬ÀË·ÑÁ˱¾¿ÉÒÔд³öÒ»¸ö×Ô¶¨Ò庯ÊýµÄʱ¼ä£¬¾ÑéÎÊÌâ°¡£¡£©£»
47¡¢Ñ»·ÄÚ²¿²»ÒªÉùÃ÷±äÁ¿£¬ÓÈÆäÊÇ´ó±äÁ¿£º¶ÔÏó(ÕâºÃÏñ²»Ö»ÊÇPHPÀïÃæҪעÒâµÄÎÊÌâ°É£¿)£»
48¡¢¶àάÊý×龡Á¿²»ÒªÑ»·Ç¶Ì׸³Öµ£»
49¡¢ÔÚ¿ÉÒÔÓÃPHPÄÚ²¿×Ö·û´®²Ù×÷º¯ÊýµÄÇé¿öÏ£¬²»ÒªÓÃÕýÔò±í´ïʽ£»
50¡¢foreachЧÂʸü¸ß£¬¾¡Á¿ÓÃforeach´úÌæwhileºÍforÑ»·£»
51¡¢Óõ¥ÒýºÅÌæ´úË«ÒýºÅÒýÓÃ×Ö·û´®£»
52¡¢¡°ÓÃi+=1´úÌæi=i+1¡£·ûºÏc/c++µÄÏ°¹ß£¬Ð§ÂÊ»¹¸ß¡±£»
53¡¢¶Ôglobal±äÁ¿£¬Ó¦¸ÃÓÃÍê¾Íunset()µô£»
ÔÎĵØÖ·£ºhttp://www.52blogger.com/archives/578
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ