中文字幕在线一区二区在线,久久久精品免费观看国产,无码日日模日日碰夜夜爽,天堂av在线最新版在线,日韩美精品无码一本二本三本,麻豆精品三级国产国语,精品无码AⅤ片,国产区在线观看视频

      php網頁病毒清除的方法

      時間:2024-11-06 00:36:04 PHP 我要投稿
      • 相關推薦

      php網頁病毒清除的方法

        很多人的網頁經常被無故的在php,asp,html,js 等文件后臺加上一些木馬地址,造成了很大的困擾,你知道要怎么清除php網頁病毒嗎?下面是應屆畢業生小編整理的一些關于php網頁病毒清除的方法的相關資料,供你參考。

        首先們要讀取 $checkFile 文件這個文章是判斷一個文章 是否被感染了,如果是就會執行$savafile變量里面的txt文件路徑的所有文件,進行按你infecFile病毒列表清除一次.

        復制代碼 代碼如下:

        Class clear_virus{

        //public $content;

        public $infectFile ='virus.txt';//病毒文件列表文件

        public $savefile ="save.txt";//所在查看病毒的文件列表

        public $timep ='time.txt';//些記錄清除病毒時間

        public $checkFile ='e.php';//這里是設置

        public $run =0;

        public $virus_type;

        public $replace ;

        public $filepath ;

        public $tag =0;

        function open_file(){

        $this->read_virus();

        $this->check_File();

        if($this->run){

        $this->update_time();

        $this->read_file() ;

        foreach($this->filepath as $tmppath){

        if(file_exists($tmppath)){

        $tmp_file =file_get_contents($tmppath);

        print_r( $this->virus_type);

        for( $i=0;$ivirus_type);$i++ ){

        if( strrpos($tmp_file,$this->virus_type[$i])!== false){

        $tmp_file =str_replace($this->virus_type[$i],'',$tmp_file);

        $this->tag =1;

        }

        }

        if( $this->tag ){

        $handle =fopen($tmppath,'w');

        fwrite($handle,$tmp_file);

        fclose($handle);

        unset($tmp_file);

        }

        }else{

        ;

        }

        }

        }

        }

        function check_File(){

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

        $temp =file_get_contents($this->checkFile) ;

        echo $temp;

        foreach( $this->virus_type as $v_tmp ){

        if( strrpos($temp,$v_tmp)!== false ){

        $this->run =1;

        break;

        }

        }

        echo $this->run;

        unset($temp);

        }else{

        $this->show_error(5);

        }

        }

        function update_time(){

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

        $tmp_time =date("Y-m-d H:i:s").chr(13).'|';

        $tmp_fp =fopen($this->timep,'a+');

        fwrite($tmp_fp,$tmp_time);

        fclose($tmp_fp);

        }

        }

        function read_File(){

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

        $this->content =file($this->savefile);

        if(is_array($this->content)){

        $this->filepath =$this->content;

        }else{

        $this->show_error(3);

        }

        }else{

        $this->show_error(4);

        }

        }

        function read_virus(){

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

        $this->replace =file($this->infectFile);

        if(is_array($this->replace)){

        $this->virus_type=$this->replace;

        }else{

        $this->show_error(1);

        }

        }else{

        $this->show_error(2);

        }

        }

        function show_error($number){

        $array = array(

        '1'=>'病毒文件未不能讀取!',

        '2'=>'病毒文件列表不存在!',

        '3'=>'文件列表不存了',

        '4'=>'查殺的文件不存',

        '5'=>$this->$checkFile.'不存在了,請設置病毒感染文件'

        );

        echo $array[$number];

        }

        }

        $virus =new clear_virus;

        $virus->open_file();

        ?>


      【php網頁病毒清除的方法】相關文章:

      清除指甲油的方法07-30

      幫助貓咪清除跳蚤的方法05-10

      PHP錯誤類型及屏蔽方法08-22

      PHP處理密碼的幾種方法10-17

      十天學會php的方法09-23

      MongoDB的PHP驅動方法與技巧大全09-08

      了解PHP環境搭建與配置的方法08-03

      小竅門:衣服沾上污漬的清除方法08-28

      最新預防電腦病毒的方法07-29

      PHP開發環境安裝的方法有哪些10-27

      主站蜘蛛池模板: 汽车| 中文一区二区三区无码视频| 97成人精品视频在线播放 | 丰县| 亚洲国产精品一区二区第一| 激,情四虎欧美视频图片| 亚洲精品成人av一区二区| 平舆县| 极品美女av一区二区| 黄色激情视频一区二区| 亚洲欧美久久婷婷爱综合一区天堂| 好爽~又到高潮了毛片视频| 越西县| 精品中文字幕手机在线 | 绥芬河市| 亚洲av色在线观看网站| 国产美女亚洲精品一区| 中文亚洲成a人片在线观看| 尤物蜜芽福利国产污在线观看 | 亚洲香蕉毛片久久网站老妇人| 中文字幕国内一区二区| 五月婷婷激情视频俺也去淫| 精品无人区无码乱码大片国产| 五寨县| 房山区| 亚洲无码图| 日本韩国黄色三级三级| 加勒比东京热综合久久| 婷婷国产亚洲性色av网站| 繁昌县| 国产女主播免费在线观看| 亚洲成AV人久久| 国产小视频一区二区三区| 万全县| 国产精品国产三级国产AvkTV| 亚洲午夜无码视频在线播放| 亚洲激情在线观看第三页| 中国免费一级毛片| 色乱码一区二区三区在线| 99久久婷婷这里只有精品| 99久久久久久亚洲精品|