php ·À×¢Èë¹¥»÷º¯Êý
/*php ·À×¢È뺯Êý
string $feifa ÏÞÖÆÔªËØ×é³É
ÈçÓзǷ¨×Ö·ûÌø×ªµ½ÉÏÒ»Ò³ ·µ»Ø 0 ûÓзµ»Ø 1
*/
//ʹÓ÷½·¨
//$feifa=array("select","delete","from","update","create","destory","drop","alter","and","or","like","exec","count","*","chr","mid","master","truncate","char","declare",";","-","+");
//$arrpostget=array("http://www.baidu.select cretecomdmin","wangw");
//echo saftsql($feifa,$arrpostget);
function saftsql($feifa,$arrpostget){
//
$arrpostget=array_merge((array)$HTTP_PSOT_VARS,(array)$HTTP_GET_VARS);
if($arrpostget){
foreach($arrpostget as $key=>$value){
for($i=0;$i<count($feifa);$i++){
//ÕÒ·Ç·¨×Ö·ûÔÚ$valueÖеÄλÖÃ
$flag=strpos($value,$feifa[$i]);
if($flag)
{
echo "<script
type=\"text/javascript\">alert('URLÓзǷ¨×Ö·û');</script>";
 
Ïà¹ØÎĵµ£º
×î½üÏë°²×°PEAR(PHP Extension and Application Repository),µ«ÊÇÔÚÖ´ÐÐÅú´¦ÀíÎļþgo-pear.batµÄʱºò³öÏÖÁË´íÎó£º
phar "C:\php\PEAR\go-pear.phar" does not have a signature
PHP Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: phar error: ......
<?
@session_start();
$counter = intval(file_get_contents("counter.dat"));
if(!$_SESSION['jingyun'])
{
$_SESSION['jingyun'] = true;
$counter++;
$fp = fopen("counter.dat","w");
fwrite($fp, $counter);
fclose($fp);
}
?>
×Ü·ÃÎÊ <span style="font-size:14px; color:#FF6600" mce_sty ......
×÷Õß: laruence(http://www.laruence.com
)
±¾ÎĵØÖ·: http://www.laruence.com/2010/05/04/1450.html
×ªÔØÇë×¢Ã÷³ö´¦
ÔÚ´óÐ͵ÄWebÏîÄ¿ÖÐ, include_pathÊÇÒ»¸öÄ£¿é»¯Éè¼ÆµÄ¸ù±¾Öеĸù±¾(µ±È»,ÏÖÔÚÒ²Óкܶà»ùÓÚautoloadµÄÉè¼Æ,
Õâ¸ö²»Ó°Ïì±¾ÎĵÄ̽ÌÖ), µ«ÊÇÕýÊÇÒòΪinclude_path, ¾³£»áÈÃÎÒÃÇÓöµ½Ò»Ð©ÒòΪûÓÐÕÒµ½Õ ......
htmlspecialchars()
º¯Êý°ÑһЩԤ¶¨ÒåµÄ×Ö·ûת»»Îª HTML ʵÌå¡£
ENT_COMPAT - ĬÈÏ¡£½ö±àÂëË«ÒýºÅ¡£
eg:" £¨Ë«ÒýºÅ£© ³ÉΪ "
implode()
º¯Êý°Ñ
Êý×éÔªËØ×éºÏΪһ¸ö×Ö ......