手机
当前位置:查字典教程网 >编程开发 >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生成年月日下载列表的方法

php删除文本文件中重复行的方法

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

实现树状结构的两种方法

php中smarty实现多模版网站的方法

php实现TCP端口检测的方法

PHP正则验证Email的方法

php 类自动载入的方法

php实现修改新闻时删除图片的方法

php对文件进行hash运算的方法

精品推荐
分类导航