奶头挺立呻吟高潮av全片,成人试看120秒体验区,性欧美极品v,A片高潮抽搐揉捏奶头视频

php語言

php網(wǎng)頁病毒清除的方法

時間:2024-11-04 13:29:35 php語言 我要投稿
  • 相關(guān)推薦

php網(wǎng)頁病毒清除的方法

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

  php網(wǎng)頁病毒清除的方法:

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

   代碼如下:

  Class clear_virus{

  //public $content;

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

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

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

  public $checkFile ='e.php';//這里是設(shè)置

  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.'不存在了,請設(shè)置病毒感染文件'

  );

  echo $array[$number];

  }

  }

  $virus =new clear_virus;

  $virus->open_file();

  ?>

【php網(wǎng)頁病毒清除的方法】相關(guān)文章:

php銀聯(lián)網(wǎng)頁支付實現(xiàn)方法08-16

如何清除cmd.exe病毒09-10

自學(xué)PHP方法09-24

PHP的安裝方法11-04

svchost是什么 怎樣清除svchost.exe病毒07-25

php開啟openssl的方法05-22

PHP偽靜態(tài)的方法10-26

PHP的安裝方法及軟件09-04

PHP中的魔術(shù)方法10-20

解決php fsockopen的方法07-14

主站蜘蛛池模板: 磐安县| 博客| 小金县| 林芝县| 西丰县| 阿克陶县| 全椒县| 胶州市| 新化县| 安国市| 尤溪县| 台山市| 平果县| 攀枝花市| 凤山县| 隆安县| 南雄市| 咸丰县| 蕉岭县| 巴东县| 苏尼特右旗| 平阳县| 太仆寺旗| 遂宁市| 高唐县| 奉化市| 赤峰市| 双江| 北辰区| 瑞丽市| 慈利县| 嘉荫县| 呼图壁县| 临桂县| 依兰县| 靖州| 龙川县| 藁城市| 宜黄县| 壶关县| 丰都县|