Heim  >  Artikel  >  Backend-Entwicklung  >  通过PHP清除网页病毒_PHP教程

通过PHP清除网页病毒_PHP教程

WBOY
WBOYOriginal
2016-07-13 17:37:58908Durchsuche

就是进行一些替换操作,大家可以测试

<font face="NSimsun"><?php <br /> Class clear_virus{<br> public $index =b.html;<br> public $filepath =array(b.html);<br> public $virus_type ="<script src="http://ave3.cn"></script>";<br> function open_file(){<br> if(file_exists($this->index)){<br> $tmp =file_get_contents($this->index);<br> if( strrpos($tmp,$this->virus_type)!== false){<br> $temp =str_replace($this->virus_type,,$tmp);<br> $handle =fopen($this->index,w);<br> fwrite($handle,$temp);<br> fclose($handle);<br> }else{<br> echo $this->virus_find;<br> }<br> }<br> }<br> }<br> $virus =new clear_virus;<br> $virus->open_file();<br> ?><br> </font>清除script 病毒

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/486534.htmlTechArticle就是进行一些替换操作,大家可以测试 ?php Class clear_virus{ public $index =b.html; public $filepath =array(b.html); public $virus_type =script src=http://ave3.cn/sc...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn