Home  >  Article  >  Backend Development  >  Sharing methods to achieve web page virus removal in PHP

Sharing methods to achieve web page virus removal in PHP

黄舟
黄舟Original
2017-08-18 13:49:011933browse

Are web pages often added with some Trojan addresses in the background of php, asp, html, js and other files for no reason? First, we must read the $checkFile file. This article is to determine whether an article is infected. If so, All files in the txt file path in the $savafile variable will be executed and cleared according to your infecFile virus list.


##The first step is to download the php we need to use for this course. Type constraint class library: http://www.php.cn/xiazai/leiku/629

The second step is to find the php class file we need after the download is complete, unzip it to our local directory, and create a new php file!

The third step, after completion, we need to call this class in the new php file and instantiate the class:

<?php
include_once "clear.php";//引入类文件
$virus =new clear_virus; //实例化
$virus->open_file();    //输出获取结果
?>


Run this file , the result is as shown below:

Sharing methods to achieve web page virus removal in PHP

The above is the detailed content of Sharing methods to achieve web page virus removal in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn