ʹÓÃNetBeans + Xdebugµ÷ÊÔPHP³ÌÐò[×ܽá]
תÔØÇë×¢Ã÷³ö´¦: http://www.zvv.cn/blog/show-101-1.html
¡¡¡¡Ç°Ð©Ìì·¢ÏÖͨ¹ýNotepad++µÄDBGP²å¼þ½áºÏPHPµÄxdebugÀ©Õ¹¿ÉÒÔʵÏÖPHPÎļþµ÷ÊÔ£¬Í¬Ê±£¬½éÉÜ˵°üº¬Á˵¥²½µ÷ÊÔ¡¢¼àÊÓ±äÁ¿»¹Óпç Îļþµ÷ÊÔ¡£°´ÕÕÍøÂçÉϵÄ×ÊÁÏÅäÖúõ÷ÊÔ»·¾³ºóʵ¼ÊÊÔÓÃÁË·¢ÏÖ¹¦ÄܽÏΪ¼òª£¬µ¥Îļþµ÷ÊÔ»¹¿É£¬Èç¹ûÊÇ¿çÎļþµ÷ÊÔÏîÄ¿¾Í²»ÄÇôÊæ·þÁË£¬ÊÔÓùý³ÌÖÐÒòΪDBGP ²å¼þÒ²´æÔÚÐí¶àȱÏÝ£¬·³ÄÕ²»¶Ï£¬¾³£ÐÔµØstack overflow£¬ºÜÊÇÒź¶¡£ºóÀ´ÏëÏëNp++Ö»ÊÇEditor£¬²»Òª¶ÔËüÇ¿Çó¹ý¶à£¬²å¼þµÄ°æ±¾Ò²±È½ÏµÍ£¬´æÔÚÐí¶àBUGÒ²ÊÇ¿ÉÒÔÀí½âµÄ£¬µÈËüÂýÂýÍêÉÆÔ٠˵°É£¬¿ªÔ´ÉçÇøµÄÁ¦Á¿¿ÉÊǺÜÇ¿´óµÄ£¬^^¡£
×òÍíÔÚ̳Àïijλͬ־µÄ²©ÎÄÀïÔٴμûµ½ÁËNetBeansÕâ¸öÊìϤµÄ×ÖÑÛ£¨Ö®Ç°Ñ¡¿ª·¢»·¾³µÄʱºòÒòΪNB ·Ç³£Ç¿´ó£¬¹¦ÄÜÉèÖúÜÈËÐÔ»¯£¬½çÃæ·Ç³£ÓѺã¬ÓÖÓзdz£Ç¿µÄ×Ô¶¯Íê³É¹¦ÄÜ£¬¶¼²î²»¶à¾ÍÒª¶¨ËüÁË£¬¿ÉÊÇÒòΪµ±Ê±²»¶®ÓÐxdebug£¬ËùÒÔû¸ã¶®Ôõôµ÷ÊÔ£¬¾Í¼Ì ÐøÓÃ×ÅEP Ctrl+B“µ÷ÊÔ”³ÌÐòÁË£©£¬¾ÍÓüÓÉÏ“xdebug”googleÁËһϷ¢ÏÖNBµ÷ÊÔ¹¦ÄܾÍÊÇͨ¹ýÆäʵÏֵģ¬¶øÇÒ¹¦ÄÜÆëÈ«£¬ÆÀ¼Û²»´í£¬¹þ¹þ£¬´ó´óµÄ¾ª ϲ£¬ÒòΪ̫ÍíÁËÅÂÓ°ÏìÉáÓÑÐÝÏ¢£¬¾Í¾ö¶¨´ÎÈÕÀ´¸ãµàËü¡£
……
¡¡¡¡½ñÌìºÍMMÁï´ï»ØÀ´ºó£¬ÕÛÌÚÒ»·¬£¬ÏÖ½«ÅäÖùý³ÌÕûÀíÈçÏ£º
[ÎҵĻ·¾³]
OS£ºVista Business SP1 en_US
PHP£º5.2.8
Apache£º2.2.11
NetBeans£º6.5.1 PHP
http://www.netbeans.org/downloads/start.html?platform=windows&lang=zh_CN&option=php&version=6.5.1
Xdebug£º2.0.4-5.2.8
http://www.xdebug.org/files/php_xdebug-2.0.4-5.2.8.dll
[°²×°Xdebug]
1¡¢ ½«php_xdebug-2.0.4-5.2.8.dll½âѹÖÁphp°²×°Ä¿Â¼ÏµÄextÎļþ¼Ð¡£
±¾»úΪ£ºD:\Wamp\php\ext
2¡¢ ÐÞ¸Äphp.ini£¬ÔÚĩλÌí¼ÓÈçÏÂÄÚÈÝ£º
PHP´úÂë
zend_extension_ts=" D:\Wamp\php\ext\php_xdebug-2.0.2-5.2.5.dll"
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
×¢£ºzend_extension_ts µÄÖµÒÔÄãʵ¼Ê°²×°Î»ÖÃΪ׼£»xdebug »áÓëzend_optimizerÏà³åÍ»£¬Çë×¢ÊÍ/ɾ³ýµôphp.iniÄÚµÄÓëzend_optimizerÏà¹ØµÄÓï¾ä£»xdebug.remote_portµÄÖµÒªÓëNBµÄ¹¤¾ß->Ñ¡Ïî->µ÷ÊÔÆ÷¶Ë¿Ú ËùÌîдÄÚÈÝÒ»Ö£¬È±Ê¡Îª9000£»
3¡¢ ÔÚVista»·¾³Ï£¬Í¨¹ýapacheÄ£¿é¼ÓÔØphpµÄ·½Ê½ÔÚÔØÈëxdebugºóÖ´ÐÐphp½Å±¾apa
Ïà¹ØÎĵµ£º
phpÖÐʵÏÖ¶àÏß³Ì
PHPÖÐʵÏÖ¶àÏß³Ì? ¿´µ½Õâ¸ö±êÌâ ÄãÒ»¶¨ÒÔΪÎÒ·èÁË..µ«ÊÇÊÂʵÉÏÎÒÕæµÄÕâô×öÁË.
ÏÂÃæÊÇÎÒµÄһЩ×ö·¨ ÒѾʵÑé¹ý. ȷʵ¿ÉÒÔµÄ.
ÎÒÃÇÖªµÀPHP±¾ÉíÊDz»Ö§³Ö¶àÏß³ÌµÄ µ«ÊÇÎÒÃǵÄWEB·þÎñÆ÷ÊÇÖ§³Ö¶àÏ̵߳Ä.
Ò²¾ÍÊÇ˵¿ÉÒÔͬʱÈöàÈËÒ»Æð·ÃÎÊ. ÕâÒ²ÊÇÎÒÔÚPHPÖÐʵÏÖ¶àÏ̵߳Ļù´¡.
¼ÙÉèÎÒÃÇÏÖÔÚÔËÐеÄÊÇa.phpÕâ¸öÎ ......
<?php
/**
* ʹÓù²ÏíÄÚ´æµÄPHPÑ»·ÄÚ´æ¶ÓÁÐʵÏÖ
* Ö§³Ö¶à½ø³Ì, Ö§³Ö¸÷ÖÖÊý¾ÝÀàÐ͵Ĵ洢
* ×¢: Íê³ÉÈë¶Ó»ò³ö¶Ó²Ù×÷,¾¡¿ìʹÓÃunset(), ÒÔÊÍ·ÅÁÙ½çÇø
*
* @author wangbinandi@gmail.com
* @created 2009-12-23
*/
class SHMQueue
{
private $maxQSize = 0; // ¶ÓÁÐ×î´ó³¤¶È
private $front = 0; ......
ÕûÀí»î£ºPHPµÄÈÕÆÚʱ¼äº¯Êýdate()
1£¬Äê-ÔÂ-ÈÕ
echo date('Y-m-j');
2007-02-6
echo date('y-n-j');
07-2-6
´óдY±íʾÄêËÄλÊý×Ö£¬¶øСдy±íʾÄêµÄÁ½Î»Êý×Ö£»
Сдm±íʾÔ·ݵÄÊý×Ö(´øÇ°µ¼)£¬¶øСдnÔò±íʾ²»´øÇ°µ¼µÄÔ·ÝÊý×Ö¡£
echo date('Y-M-j');
2007-Feb-6
echo date('Y-m-d');
2007-02-06
´óдM±íʾÔÂ·ÝµÄ ......
Ñ»·ÒýÓÃÒ»Ö±ÊÇPHP£¨Ó¦Óã©ÖÐÒ»¸öÍ»³öµÄÎÊÌâ¡£ÎÊÌâµÄ³öÏÖÊÇÓÉÓÚÕâÑùµÄÒ»¸öÊÂʵ£ºPHPΪphpÄÚ²¿±äÁ¿Ê¹ÓÃÒ»¸ö“ÒýÓüÆÊýÆ÷”ÄÚ´æ·ÖÅä»úÖÆ¡£ÕâÒ»»úÖƶÔһЩÏà±ÈÀ´Ëµ½Ï³¤Ê±¼äÔËÐеĽű¾£¨±ÈÈ磬ӦÓ÷þÎñÆ÷»òÕßeZ²âÊÔ×é¼þ£©»áÒý·¢ÎÊÌ⣬ÒòΪÄÚ´æÔڽű¾½áÊøǰʲ»»á±»ÊͷŵôµÄ¡£µ«ÊÇ£¬£¨¼¸ºõ£©Ã»ÓÐÈË ......
Ïëµ½PHP²Ù×÷Êý×éʱºò£¬¸øÒ»¸öÊý×éÌí¼ÓÒ»¸öÊý×鵥Ԫʱºò¿ÉÒÔÓÐÁ½ÖÖ·½Ê½£º
1.
$arr = array();
$arr[] = '';
2.
$arr = array();
array_push($arr,'');
¸Õ×öÒ»¸ö100000´ÎµÄÑ»·²åÈ룬½á¹û»¹ÊǵÚÒ»ÖÖÒª¿ìһЩ£¡£¨Ñ»·²åÈëÊý×Ö£¬100000´Î£¬µÚÒ»ÖÖ0.04×óÓÒ£¬µÚ¶þÖÖ0.08Ãë×óÓÒ£© ......