ÔÚvimÖÐʹÓÃxdebugµ÷ÊÔPHP³ÌÐò
²Ù×÷ϵͳcentos 5.3£¬php 5.1.6, xdebug 2.0.5¡£
Ö÷Òª²Î¿¼Îĵµ£º
xdebugµÄ°²×°Îĵµ£ºhttp://xdebug.org/docs/install¡£
xdebugµÄÔ¶³Ìµ÷ÊÔÅäÖÃÎĵµ£ºhttp://xdebug.org/docs/remote
Using vim and xdebug DBGp for debugging Drupal (or any PHP application)£º
http://2bits.com/articles/using-vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html
һλÍøÓѵIJ©ÎÄ£º
http://blog.johnpupu.tw/2008/05/14/208/
ÐèÒªµÄÈí¼þ°ü£º
vim²å¼þ£¬ÏÂÔصØÖ·£º
http://www.vim.org/scripts/script.php?script_id=1929
xdebug2.0.5£¬ÏÂÔصØÖ·£º
http://xdebug.org/download.php
»¹ÐèÒª°²×°python2.3»òÕßÒÔÉϵİ汾¡£
Ê×ÏÈ°²×°xdebug:
ÏÂÔØxdebug 2.0.5Ô´´úÂë°ü£¬½âѹ£¬½øÈëµ½xdebugÔ´´úÂëĿ¼£¬°´ÕÕÆäÖеÄREADMEÎļþ»òÕßÉÏÃæ¸ø³öµÄxdebug°²×°ÎĵµµÄ˵Ã÷½øÐа²×°¡£ÆäÖÐÒªÓõ½phpize½Å±¾£¬°²×°ÁËphp-develÒÔºó¾Í»áÓÐphpizeºÍphp-configÕâÁ½¸ö½Å±¾¡£
[root@jcwkyl xdebug-2.0.5]# mount /dev/cdrom
[root@jcwkyl xdebug-2.0.5]# localyum install php-devel
[root@jcwkyl xdebug-2.0.5]# phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
[root@jcwkyl xdebug-2.0.5]# ./configure –enable-xdebug
[root@jcwkyl xdebug-2.0.5]# make
Íê³ÉÖ®ºó£¬»áÔÚmodulesĿ¼ÖÐÉú³Éxdebug.soÎļþ¡£
[root@jcwkyl xdebug-2.0.5]# locate php.ini
/etc/php.ini
[root@jcwkyl xdebug-2.0.5]# vim /etc/php.ini
ÔÚÎļþ×îºó¼ÓÉÏÕâÒ»¾ä£º
zend_extension="/home/whb/lib/xdebug-2.0.5/modules/xdebug.so"
[root@jcwkyl xdebug-2.0.5]# service httpd restart
ÑéÖ¤xdebugÒѾ³É¹¦°²×°£º
[root@jcwkyl xdebug-2.0.5]# php -m
[PHP Modules]
bz2
calendar
……
xdebug
……
zlib
[Zend Modules]
Xdebug
¿´µ½xdebug³öÏÖÁËÁ½´Î£¬Ò»´ÎÊÇÔÚ[PHP Modules]ÖУ¬Ò»´ÎÊÇÔÚ[Zend Modules]ÖУ¬Õâ˵Ã÷ËüÒѾ±»³É¹¦°²×°ÁË¡£
°²×°vim²å¼þ£¬°Ñ½âѹºóµÄplugin/debug*¸´ÖƵ½/usr/share/vim/vim70/pluginĿ¼Ï¡£
ÅäÖÃxdebugµÄÔ¶³Ìµ÷ÊÔ£º
ÔÚ/etc/php.iniÖмÓÈëÏÂÃæµÄÉèÖãº
xdebug
Ïà¹ØÎĵµ£º
±¾ÎÄת×Ô:http://www.msphome.cn/post/119/
×î½üÒòΪҪ¶ÔÒ»¸öÏîÄ¿½øÐÐÖع¹£¬ËùÒÔÒ»Ö±ÔÚÑо¿PHP¿ò¼Ü¡£´óÌå¿´ÁË¿´Zend Frameworks£¬×ÐϸѧϰÁËÏÂsymfony£¬·¢ÏÖÒ»¸öÁ¼ºÃµÄMVC Web¿ò¼Ü£¬×ãÒԸı俪·¢Ï°¹ß¡£µ«ÊÇÎÞÂÛÊÇZend Frameworks»¹ÊÇsymfony£¬¶ÔÓÚÖÐСÐÍÏîÄ¿µÄ¿ª·¢À´Ëµ¶¼¹ýÓÚÓ·Ö×£¬²¢²»ÄܺܺõÄÌáÉý¿ª· ......
in_array(value,array,type)
in_array ×÷ÓÃÊÇÓÃÓڲ鿴 value ÊÇ·ñÔÚ array ÖдæÔÚ£¬Èç¹û²ÎÊý value ÊÇ×Ö·û´®£¬ÇÒ type ²ÎÊýÉèÖÃΪ true£¬ÔòËÑË÷Çø·Ö´óСд¡£Ôò in_array ÊÇ Çø·Ö´óСд µÄ¡£
ÓÐÒ»µãÐèҪעÒ⣬µ± array Öаüº¬ value µÄÖµ£¬Ôò·µ»Ø true£» µ«ÊÇ£¬Èç¹ûÁ½Õß²ÎÊýÖ®¼äÏàµÈ£¬Ôò·µ»Ø false
ÀýÈ磺
$str = 'a';
......
Ëæ ×ÅÍøÕ¾·ÃÎÊÁ¿µÄ¼Ó´ó£¬Ã¿´Î´ÓÊý¾Ý¿â¶ÁÈ¡¶¼ÊÇÒÔЧÂÊ×÷Ϊ´ú¼ÛµÄ£¬ºÜ¶àÓÃACCESS×÷Êý¾Ý¿âµÄ¸ü»áÉîÓÐÌå»á£¬¾²Ì¬Ò³¼ÓÔÚËÑË÷ʱ£¬Ò²»á±»ÓÅÏÈ¿¼ÂÇ¡£»¥ÁªÍøÉÏÁ÷ ÐеÄ×ö·¨Êǽ«Êý¾ÝÔ´´úÂëдÈëÊý¾Ý¿âÔÙ´ÓÊý¾Ý¿â¶ÁÈ¡Éú³É¾²Ì¬Ã棬ÕâÑùÎÞÐμä¾Í¼Ó´óÁËÊý¾Ý¿â¡£½«ÏÖÓеÄASPÒ³Ö±½ÓÉú³É¾²Ì¬Ò³£¬½«»á½ÚÊ¡ºÜ¶à¡£
ÏÂÃæµÄÀý×ÓÊǽ«¡¢index.asp?i ......
ÈçºÎÅжÏipµØÖ·ºÏ·¨ÐÔ
if(!strcmp(long2ip(sprintf("%u",ip2long($ip))),$ip)) echo "is ipn";
emailµÄÕýÔòÅжÏ
eregi("^[_.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z_-]+.)+[a-zA-Z]$", $email);
¼ì²âipµØÖ·ºÍmaskÊÇ·ñºÏ·¨µÄÀý×Ó
$ip = '192.168.0.84';
$mask = '255.255.255.0';
$network = '192.168.0';
$ip = ......