PHP bug??global·¢ÏÖµÄÎÊÌâ
ÈçÏÂphp´úÂë
<?php
$type='a';
$target='type';
$a=array(1,2,3);
a($target);
function a($type)
{
global $$type;
var_dump($$type);
}
?>
Ô¤¼ÆÊä³öµÄÊÇstring(1)”a”
¿ÉÊǽá¹ûÊÇ
Notice: Undefined variable: a in D:\web\global.php on line 11
NULL
ÒòΪglobalµÄʱºòÒý½øÁË$type,˳±ã°ÑÈ«¾ÖµÄ$typeÒý½øÁË,º¯ÊýÄÚ²¿µÄ$typeµÄÖµ±»Ð޸ijÉÁËÈ«¾ÖµÄ'a',¶øº¯ÊýÄÚ²¿ÓÖûÓÐ$a,ËùÒÔ±¨´íºÍ´òÓ¡null
²»ÖªµÀÕâÊÇphpµÄ´íÎó»¹ÊǾÍÊÇglobalµÄ»úÖÆ,²»¹ý¸öÈËÈÏΪÕâ¸öÇé¿öÏÂÖ»Òý½ø$type¾Í¿ÉÒÔÁË
Ïà¹ØÎĵµ£º
¼¸ÌìûÓиüеÄblogÕâÁ½ÌìÔÚд¸öС¶«Î÷ÍæÍæ
ÏÖÔÚÊÇ»ù±¾ÄÜÓÃÁË
×î½üûʲôÊÂ×ö£¬¾ÍÏëµ½Á˲鿴·þÎñ¶ËĿ¼µÄС³ÌÐòÍæÍæ
ÏÖÔڲ鿴ÒѾдÍêÁË·¢ÉÏÀ´¸ø´ó¼Ò¿´¿´
demoµØÖ·
http://www.web-jia.com/demo/folder/demo.html
ÎÒ·ÖÏíµÄ´úÂ뻶Ӵó¼ÒÀ´ÏÂÔØ°¡
ÏÂÔØ¿ÉÒÔµ½
http://www.web-jia.com/viewthread.php?tid=2832&ext ......
ÕâÀï50¸öÓÐÒæµÄPHP¹¤¾ß£¬¿ÉÒÔ´ó´óÌá¸ßÄãµÄ±à³Ì¹¤×÷£º
µ÷ÊÔ¹¤¾ß
Webgrind
Xdebug
Gubed PHP Debugger
DBG
PHP_Debug
PHP_Dyn
MacGDBp
²âÊÔºÍÓÅ»¯¹¤¾ß
PHPUnit
SimpleTest
Selenium
PHP_CodeSniffer
dBug
PHP Profile Class
Îĵµ¹¤¾ß
phpDocumentor
PHP DOX
°²È«¹¤¾ß
Securimage
£ºÑéÖ¤Â빤¾ß¡£
Scave ......
ÓÐÖÖ˵·¨£ºPHPÊÇ×î¼òµ¥µÄÍøÕ¾¿ª·¢ÓïÑÔ£¬ÕâÖÖ¹ÛµãÊÇ´íµÄ¡£
ľͷ±È»ýľ¼òµ¥£¬µ«Ä¾½³ºÍº¢×ӵIJî±ðÊÇľ½³ÄÜ°ÑľͷºÍ»ýľ¶¼±ä³É·¿×Ó£¬º¢×ÓÖ»ÄÜ°Ñ»ýľ±ä³É·¿×Ó£¬¶ÔÓÚľͷËûÃÇÖ»ÄÜÔÚÉÏÃ滸ö·¿×Ó¶øÒÑ¡£
PHP¾ÍÏñľͷ£¬²ËÄñÖ»ÄÜÓÃËü×öµã¼òµ¥µÄÊÂÇ飬¸ßÊ־ͻá°ÑËü±ä³ÉÎÞËù²»ÄÜ¡£
¼ÈÈ»PHP¼òµ¥ÓÖÊǸßÊÖìÅÒ«µÄ¶«Î÷£¬ÄÇÔõôѧ²ÅÄܱä³É¸ ......
ÉÏһƪÖУ¬¼òµ¥Ð´Á˸öInput.php £¬ µ«ÉúÈÕÄÇÒ»À¸Òª×Ô¼ºÊÖ¶¯ÊäÈëд£¬±È½ÏÂé·³£¬ËùÒÔÕâÀïÓõ½Ò»¸öJSÎļþ£¬¿ÉÒÔÑ¡ÔñÈÕÆÚ
µã»÷ÏÂÔØÕâ¸öjsÎļþ
ÔÚInput.phpÎļþ×¶ËÒýÓÃÕâ¸öJSÎļþ
<script type="text/javascript" src="calenderJS.js"></script>
½«ÉúÈÕµÄÊäÈë¿ò¸Ä³É
<input name="birthday" type="text" ......
¸ãÁ˺ܾᣡ£ÖÕÓÚ·¢ÏÖÔÀ´ÊÇȨÏÞÎÊÌâ¡£¡£
2ÐÐÃüÁî¸ã¶¨
grant all privileges on rogue.* to admin@localhost identified by 'admin' with grant option
grant all privileges on rogue.* to admin@'%' identified by 'admin' with grant option
¾µäÁË¡£¡£¡£
ħÁ¦Ë½·þÍøÒ³¶Ë¸ã¶¨¿©~~ ......