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

ÖØȼÄãµÄPHP°²È«Ö®»ð

¶ÔÓڽű¾°²È«Õâ¸ö»°ÌâºÃÏñÓÀԶûÍêûÁË£¬Èç¹ûÄã¾­³£µ½¹úÍâµÄ¸÷ÖÖ¸÷ÑùµÄbugtraqÉÏ£¬Äã»á·¢ÏÖÓÐÒ»°ëÒÔÉ϶¼ºÍ½Å±¾Ïà¹Ø£¬ÖîÈçSQL
injection£¬XSS£¬Path Disclosure£¬Remote commands
executionÕâÑùµÄ×ÖÑ۱ȱȽÔÊÇ£¬ÎÒÃÇ¿´ÁËÖ®ºóµÄÓÃ;ÄѵÀ½ö½öÊÇ×¥È⼦?¶ÔÓÚÎÒÃÇÏë×öweb°²È«µÄÈËÀ´Ëµ£¬×îºÃ¾ÍÊÇÄÃÀ´Ñ§Ï°£¬¿ÉÊÇÍòÎï×¥¸ùÔ´£¬ÎÒÃÇ
ÒªµÄ²»ÊÇÓã¶øÊÇÓæ¡£ÔÚ¹úÄÚ£¬¸÷ÖÖ¸÷ÑùµÄphp
³ÌÐò1.0°æ£¬2.0°æÏñÓêºó´ºËñÒ»ÑùµÄð³öÀ´£¬
¿ÉÊÇ£¬´ó¼Ò¹Ø×¢µÄ¶¼ÊÇһЩÖøÃûµÄcms£¬ÂÛ̳
£¬blog³ÌÐò£¬ºÜÉÙµÄÈËÔÚ¶ÔÄÇЩ²»³öÃûµÄ³ÌÐò×ö°²
È«¼ì²â£¬¶ÔÓÚÔ½À´Ô½¶àµÄphp³ÌÐòÔ±
ºÍÕ¾³¤À´Ëµ£¬³ýÁËÒÀ¿¿·þÎñÆ÷
µÄ±¤ÀÝÉèÖÃÍ⣬php³ÌÐò±¾ÉíµÄ°²È«¶àÉÙÄã×ܵö®
µã°É¡£
¡¡¡¡ÓÐÈË˵ÄãÃÇ×öphp°²È«Î޷ǾÍÊǸã¸ã×¢ÈëºÍ¿çվʲôʲôµÄ£¬´ó´íÌØ´í£¬Èç¹ûÕâÑùµÄ»°£¬Ò»¸ömagic_quotes_gpc»òÕß·þÎñÆ÷ÀïµÄһЩ°²È«Éè
ÖþÍÈÃÎÒÃÇȫû»î·ÁË£º(¡£ÎÒ½ñÌìҪ˵µÄ²»ÊÇ×¢È룬²»ÊÇ¿çÕ¾£¬¶øÊÇ´æÔÚÓÚphp³ÌÐòÖеÄһЩ°²È«Ï¸½ÚÎÊÌâ¡£OK!ÇÐÈëÕýÌâ¡£
¡¡¡¡×¢ÒâһЩº¯ÊýµÄ¹ýÂËÓÐЩº¯ÊýÔÚ³ÌÐòÖÐÊǾ­³£Ê¹Óõģ¬Ïñ
include()£¬require()£¬fopen()£¬fwrite()£¬readfile()£¬unlink()£¬eval()ÒÔ¼°ËüÃǵıäÌ庯Êý
µÈµÈ¡£ÕâЩº¯Êý¶¼ºÜʵÓã¬ÊµÓò¢²»´ú±íÈÃÄã¶àÊ¡ÐÄ£¬Ä㻹µÃΪËüÃǶà·ÑµãÐÄ¡£ £º)
¡¡¡¡1.include()£¬require()ºÍ fopen()£¬include_once()£¬require_once()ÕâЩ¶¼¿ÉÒÔÔ¶³Ìµ÷ÓÃÎļþ
£¬¶ÔÓÚËüÃǵÄΣº¦£¬googleËÑÒ»ÏÂÄã¾Í»áºÜÃ÷
ÁË£¬¶ÔÓÚËù°üº¬µ÷ÓõıäÁ¿Ã»¹ýÂ˺㬾ͿÉÒÔÈÎÒâ°üº¬Îļþ´Ó¶øÈ¥Ö´ÐС£¾Ù¸öÀý×Ó£¬¿´print.php……
¡¡¡¡if (empty ($bn) ) { //¼ì²éÊDZäÁ¿$bnÊÇ·ñΪ¿Õinclude
("$cfg_dir/site_${site}.php"); //°Ñ$cfg_dirÕâ¸ö·¾¶ÀïµÄsite_${site}.php°üº¬½øÀ´……
¡¡¡¡²»¹Ü´æ²»´æÔÚ$cfg_dirĿ¼£¬$siteÕâ¸ö±äÁ¿Äã¿ÉÒÔºÜ×ÔÈ»µÄȥʹÓã¬ÒòΪËû¸ù±¾Ã»¼ì²é$site±äÁ¿°¡¡£¿ÉÒ԰ѱäÁ¿$siteÖ¸¶¨Ô¶³ÌÎļþ
È¥µ÷Óã¬Ò²¿ÉÒÔÊDZ¾µØµÄÒ»¸öÎļþ£¬ÄãËùÖ¸¶¨µÄÎļþÀïдÉÏphpµÄÓï¾ä£¬È»ºóËü¾ÍÈ¥°üº¬Ö´ÐÐÕâ¸öº¬ÓÐphpÓï¾äµÄÎļþÁË¡£¾ÍÏñÕâÑùÁгöÎļþĿ¼ÉõÖÁ¿ÉÒÔÀ©Õ¹
µ½°üº¬Ò»Ð©¹ÜÀíÔ±Îļþ£¬ÌáÉýȨÏÞ£¬µäÐ͵ÄÏñÒÔÇ°phpwind£¬bo-blogµÄ©¶´Ò»Ñù¡£³ýÁËÒÀ¿¿php.iniÀïµÄallow_url_fopenÉè
Ϊ off½ûÖ¹Ô¶³ÌʹÓÃÎļþºÍopen_base_dir½ûֹʹÓÃĿ¼ÒÔÍâµÄÎļþÍ⣬Ä㻹µÃÊÂÏÈÉùÃ÷ºÃÖ»ÄÜ°üº¬ÄÄЩÎļþ£¬ÕâÀï¾Í²»¶à˵·Ï»°ÁË¡£
¡¡¡¡2.fopen()£¬file()£¬readfile()£¬openfile()£¬µÈÒ²ÊǸÃÌرðÁ


Ïà¹ØÎĵµ£º

ÓÃPHP×ö¸öÈ˲ÅÕ¾

  ×î½üÓÐÈËÔÚÕбêÒª×ö¸öÏñ£ºwww.webjianzhi.com ÕâÑùµÄÈ˲ÅÕ¾£¬³õ¿´£¬Õâ¸öÍøÂç¼æÖ°Íø£¬½çÃ滹ÊDZȽÏÇåÎúµÄ¡£
 ÕûÌå·ÖÎöÁËһϣ¬Ò»¸öÐÂÎÅÎÄÕ·¢²¼ÏµÍ³£¬Õâ¸ö²»ÊǺÜÄÑ£¬ÁíÒ»¸ö¾ÍÊÇ×ֶε÷ÓÃϵͳ£¬¾ÍÊÇÊ×Ò³µÄÖ°Òµ½éÉÜ£¬¼æÖ°ÈËÆø£¬µÄÕâЩµ÷Óá£
 ÁíÒ»¸ö¾ÍÊÇ»áÔ±·¢²¼ÏµÍ³¡£
  Õû¸öÓñí¸ñ²¼¾Ö£¬ÃÀ¹¤Éϲ»´æÔ ......

PHPÎļþº¯Êý´óÈ«

ת×Ô http://wiki.kuaizhanbao.com/2009/1210/245.html
basename — ·µ»Ø·¾¶ÖеÄÎļþÃû²¿·Ö
chgrp — ¸Ä±äÎļþËùÊôµÄ×é
chmod — ¸Ä±äÎļþģʽ
chown — ¸Ä±äÎļþµÄËùÓÐÕß
clearstatcache — Çå³ýÎļþ״̬»º´æ
copy — ¿½±´Îļþ
delete — ²Î¼û unlink() »ò unset()
di ......

PHP ÖÆ×÷ͨѶ¼£¨Áù£©

×òÌìÎÒÃÇʵÏÖÁËÒ»¸ö¼òµ¥µÄËÑË÷¹¦ÄÜ£¬½ñÌìÎÒÏëÁËһϣ¬Æäʵ»¹ÓпÉÒԸĽøµÄµØÖ·£¬ÈçÖ±½ÓÓÃIndex.php´úÌæSearch.php¡£
ÐÞ¸ÄIndex.phpÎļþ£¬ÐÞ¸ÄÒ»ÏÂËÑË÷±íµ¥
<!---ËÑË÷¿ò--->
<!--ÕâÀïµÄËùÓÐֵǰÃæ¼Óǰ׺“S_”ÒÔÇø·Ö-->
<form id="form1" name="form1" method="get" action="Index.php">
&n ......

PHP ÅжÏFORMÀ´µÄÊý¾ÝÊÇ·ñΪÕûÊý

is_intº¯Êý¶ÔÓÚFORM¹ýÀ´µÄÊý¾ÝÊÇûÓа취ÅжÏÊÇ·ñÊÇÕûÊýµÄ£¬ÒòΪFORM¹ýÀ´µÄÊÇ×Ö·û´®¡£ÓÃis_numeric¿ÉÒÔÅжÏÊÇ·ñΪÊý×ÖÀàÐÍ£¬ÉÔ¶¯ ÏÂÊֽžͿÉÒÔÅжÏÊDz»ÊÇÕûÊýÁË
if(!is_numeric($jp_total)||strpos($jp_total,".")!==false){
echo "²»ÊÇÕûÊý";
}else{
echo "ÊÇÕûÊý";
} ......

PHP Floating point precision

Floating point precision
It is typical that simple decimal fractions like 0.1
or
0.7
cannot be converted into their internal binary
counterparts without a small loss of precision. This can lead to
confusing
results: for example, floor((0.1+0.7)*10)
will usually
return 7
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ