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

ÔÚ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


Ïà¹ØÎĵµ£º

phpµÄÊý¾Ý²Ù×÷ui

 <?php
 
error_reporting(0);//7all,0no
ini_set('display_errors', '0');
function myerror($errno, $errstr, $errfile, $errline)
{
    echo "<BR>error type: [$errno] $errstr<br />\n";
    echo "in line $errline of file $errfile<BR>";
} ......

PHP³£Óú¯ÊýÍÆ¼ö

 
1.²úÉúËæ»ú×Ö·û´®º¯Êý
function random($length) {
 $hash = '';
 $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
 $max = strlen($chars) - 1;
 mt_srand((double)microtime() * 1000000);
 for($i = 0; $i < $length; $i++) {
  $ha ......

php³£Óú¯Êý3


 
<?php
class useful{
 /*
  * ³£Óú¯ÊýÀà
  * ×÷    Õߣº¶à²ËÄñ
  * ÁªÏµÓÊÏ䣺kingerq AT msn DOT com
  * ´´½¨Ê±¼ä£º2005-07-18
  * À´Ô´£ºhttp://blog.csdn.net/kingerq
  */
 
 /*
  * ¹¦ÄÜ£º¸ñʽ»¯Êý×Ö£¬ÒÔ±ê×¼MONEY¸ñʽÊä³ö
......

phpÖÐpackÓëunpack

pack/unpackµÄÃþ°å×Ö·û×Ö·ûº¬Òå
format ²ÎÊýµÄ¿ÉÄÜÖµ£º
a - NUL-padded string
A - SPACE-padded string
h - Hex string, low nibble first
H - Hex string, high nibble first
c - signed char
C - unsigned char
s - signed short (always 16 bit, machine byte order)
S - unsigned short (always 16 bi ......

PHP »ù´¡ ÃæÊÔÌâ ÔÓÂÒ

»ù´¡Ìâ
¡¡¡¡1.±íµ¥ÖÐ getÓëpostÌá½»·½·¨µÄÇø±ð?
¡¡¡¡´ð£ºgetÓû§¶Ë½«Êý¾Ý¼Óµ½URLºó£¬¸ñʽΪ”?×Ö¶Î1=ÊäÈëÊý¾Ý1&×Ö¶Î2=ÊäÈëÊý¾Ý2&..."¡£
¡¡¡¡ÓÉÓÚgetÌá½»²ÎÊýºó»áÔÚµØÖ·À¸ÖÐÏÔʾ³öÀ´£¬ËùÒÔ»á²úÉúÑÏÖØµÄ°²È«ÎÊÌâ¡£
¡¡¡¡get´«ÊäµÄÊý¾ÝÁ¿Ð¡£¬get´«ÊäµÄÊý¾ÝÁ¿Ð¡£¬ÕâÖ÷ÒªÊÇÒòΪÊÜurl³¤¶ÈÏÞÖÆ;¶øpost¿ÉÒÔ´«Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ