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

php³£ÓõÄÕýÔò¹ýÂË


$str=preg_replace("/\s+/", " ", $str); //¹ýÂ˶àÓà»Ø³µ   
$str=preg_replace("/<[ ]+/si","<",$str); //¹ýÂË<__("<"ºÅºóÃæ´ø¿Õ¸ñ)   
  
$str=preg_replace("/<\!--.*?-->/si","",$str); //×¢ÊÍ   
$str=preg_replace("/<(\!.*?)>/si","",$str); //¹ýÂËDOCTYPE   
$str=preg_replace("/<(\/?html.*?)>/si","",$str); //¹ýÂËhtml±êÇ©   
$str=preg_replace("/<(\/?head.*?)>/si","",$str); //¹ýÂËhead±êÇ©   
$str=preg_replace("/<(\/?meta.*?)>/si","",$str); //¹ýÂËmeta±êÇ©   
$str=preg_replace("/<(\/?body.*?)>/si","",$str); //¹ýÂËbody±êÇ©   
$str=preg_replace("/<(\/?link.*?)>/si","",$str); //¹ýÂËlink±êÇ©   
$str=preg_replace("/<(\/?form.*?)>/si","",$str); //¹ýÂËform±êÇ©   
$str=preg_replace("/cookie/si","COOKIE",$str); //¹ýÂËCOOKIE±êÇ©   
  
$str=preg_replace("/<(applet.*?)>(.*?)<(\/applet.*?)>/si","",$str); //¹ýÂËapplet±êÇ©   
$str=preg_replace("/<(\/?applet.*?)>/si","",$str); //¹ýÂËapplet±êÇ©   
  
$str=preg_replace("/<(style.*?)>(.*?)<(\/style.*?)>/si","",$str); //¹ýÂËstyle±êÇ©   
$str=preg_replace("/<(\/?style.*?)>/si","",$str); //¹ýÂËstyle±êÇ©   
  
$str=preg_replace("/<(title.*?)>(.*?)<(\/title.*?)>/si","",$str); //¹ýÂËtitle±êÇ©   
$str=preg_replace("/<(\/?title.*?)>/si","",$str); //¹ýÂËtitle±êÇ©   
  
$str=preg_replace("/<(object.*?)>(.*?)<(\/object.*?)>/si","",$str); //¹ýÂËobject±êÇ©   
$str=preg_replace("/<(\/?objec.*?)>/si","",$str); //¹ýÂËobject±êÇ©   
  
$str=preg_replace("/<(noframes.*?)>(.*?)<(\/noframes.*?)>/si","",$str); //¹ýÂËnoframes±êÇ©   
$str=preg_replace("/<(\/?noframes.*?)>/si","",$str); //¹ýÂËnoframes±êÇ©   


Ïà¹ØÎĵµ£º

phpÂÒÂëÎÊÌâ

½ñÌìÓöµ½ÁËÒ»¸öºÜÆæ¹ÖµÄÂÒÂëÎÊÌ⣬×Ô¼ºÎÞÒâÖнâ¾öÁË£¬µ«²»ÖªµÀÊÇʲôԭÒò£¬Ö»ºÃ¼ÇÏÂÀ´£¬·ÀÖ¹ÒÔºóÔÙ³öÏÖÕâÑùµÄÎÊÌâ¡£
µ±ÎÒ°ÑphpÓï¾äдµ½ÏÂÃæµÄÒ³ÃæÍ·ÐÅϢ֮ǰµÄʱºò£¬ÕâЩphpÊä³öÓï¾ä¶¼Êä³öµÄÊÇÂÒÂ룬°üÀ¨ÓÃechoÊä³öµÄjs¡£È磺echo "<script languge=javascript> alert('Ìí¼Ó³É¹¦!');location.href = 'device_add.php ......

[ת£ÝÉîÈëÀí½âPHPÖ®require/include˳Ðò


×÷Õß: laruence(http://www.laruence.com
)
±¾ÎĵØÖ·: http://www.laruence.com/2010/05/04/1450.html
תÔØÇë×¢Ã÷³ö´¦
ÔÚ´óÐ͵ÄWebÏîÄ¿ÖÐ, include_pathÊÇÒ»¸öÄ£¿é»¯Éè¼ÆµÄ¸ù±¾Öеĸù±¾(µ±È»,ÏÖÔÚÒ²Óкܶà»ùÓÚautoloadµÄÉè¼Æ,
Õâ¸ö²»Ó°Ïì±¾ÎĵÄ̽ÌÖ), µ«ÊÇÕýÊÇÒòΪinclude_path, ¾­³£»áÈÃÎÒÃÇÓöµ½Ò»Ð©ÒòΪûÓÐÕÒµ½Õ ......

php»ñÈ¡³ÌÐòÖ´ÐеÄʱ¼ä

ÔÚhead.htmÖмÓÈ룬Ҳ¾ÍÊÇÔÚĬÈÏÄ£°æÖÐÌí¼Ó“$stime=microtime(true); //»ñÈ¡³ÌÐò¿ªÊ¼Ö´ÐеÄʱ¼ä”
¾ä
<!--<?php
$stime=microtime(true); //»ñÈ¡³ÌÐò¿ªÊ¼Ö´ÐеÄʱ¼ä
$GuideFid[$fid]=str_replace("<a href='$webdb[www_url]' class='guide_menu'>>Ê×Ò³</a>","",$GuideFid[$fid]);
$f ......

ÊÕ²ØÒ»¸öphpͼƬ´¦ÀíÀà

ʹÓ÷½·¨:
×Ô¶¯²ÃÇÐ:
³ÌÐò»á°´ÕÕͼƬµÄ³ß´ç´ÓÖв¿²ÃÇÐ×î´óµÄÕý·½ÐΣ¬²¢°´Ä¿±ê³ß´ç½øÐÐËõÂÔ
  
    $t->setSrcImg("img/test.jpg");
    $t->setCutType(1);//ÕâÒ»¾ä¾ÍOKÁË
    $t->setDstImg("tmp/new_test.jpg");
    $t-&g ......

ÓÅ»¯PHP´úÂëµÄ42Ìõ½¨Òé

1.Èç¹ûÒ»¸ö·½·¨¿É¾²Ì¬»¯£¬¾Í¶ÔËü×ö¾²Ì¬ÉùÃ÷¡£ËÙÂÊ¿ÉÌáÉýÖÁ4±¶¡£
2.echo ±È print ¿ì¡£
3.ʹÓÃechoµÄ¶àÖزÎÊý£¨Òë×¢£ºÖ¸ÓöººÅ¶ø²»ÊǾäµã£©´úÌæ×Ö·û´®Á¬½Ó¡£
4.ÔÚÖ´ÐÐforÑ­»·Ö®Ç°È·¶¨×î´óÑ­»·Êý£¬²»ÒªÃ¿Ñ­»·Ò»´Î¶¼¼ÆËã×î´óÖµ¡£
5.×¢ÏúÄÇЩ²»ÓõıäÁ¿ÓÈÆäÊÇ´óÊý×飬ÒÔ±ãÊÍ·ÅÄÚ´æ¡£
6.¾¡Á¿±ÜÃâʹÓÃ__get£¬__set£¬__autolo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ