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Êä³öÓï¾ä¶¼Êä³öµÄÊÇÂÒÂ룬°üÀ¨ÓÃechoÊä³öµÄjs¡£È磺echo "<script languge=javascript> alert('Ìí¼Ó³É¹¦!');location.href = 'device_add.php ......
×÷Õß: laruence(http://www.laruence.com
)
±¾ÎĵØÖ·: http://www.laruence.com/2010/05/04/1450.html
×ªÔØÇë×¢Ã÷³ö´¦
ÔÚ´óÐ͵ÄWebÏîÄ¿ÖÐ, include_pathÊÇÒ»¸öÄ£¿é»¯Éè¼ÆµÄ¸ù±¾Öеĸù±¾(µ±È»,ÏÖÔÚÒ²Óкܶà»ùÓÚautoloadµÄÉè¼Æ,
Õâ¸ö²»Ó°Ïì±¾ÎĵÄ̽ÌÖ), µ«ÊÇÕýÊÇÒòΪinclude_path, ¾³£»áÈÃÎÒÃÇÓöµ½Ò»Ð©ÒòΪûÓÐÕÒµ½Õ ......
ÔÚ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 ......
Ê×ÏÈÉêÃ÷£ºÕâ¸öÊÇÎÒ×ªÔØµÄ£¬ÖÂÁ¦ÓÚΪÏñÎÒÒ»ÑùµÄÐÂÊÖÌṩ°ïÖú£¡
1¡¢IISÏÂ301ÉèÖà InternetÐÅÏ¢·þÎñ¹ÜÀíÆ÷ -> ÐéÄâĿ¼ -> ÖØ¶¨Ïòµ½URL£¬ÊäÈëÐèҪתÏòµÄÄ¿±êURL£¬²¢Ñ¡Ôñ“×ÊÔ´µÄÓÀ¾ÃÖØ¶¨Ïò”¡£
2¡¢ASPϵÄ301תÏò´úÂë
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanent ......