ホームページ  >  記事  >  バックエンド開発  >  php_PHP チュートリアルで Web ウイルスを削除する方法

php_PHP チュートリアルで Web ウイルスを削除する方法

WBOY
WBOYオリジナル
2016-07-21 15:48:38866ブラウズ

Class clear_virus{
public $index ='b.html';
public $filepath =array('b.html');
public $virus_type ="";
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 =新しいclear_virus;
$virus->open_file();
?>
清除スクリプトウイルス

www.bkjia.comtru​​ehttp://www.bkjia.com/PHPjc/319715.html技術記事 ?php クラス 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(fi...
声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。