MySQL remove pants (remove database) General script

Source: Internet
Author: User

Introduction: This is a detailed page of MySQL General script for getting out of the database. It introduces PHP, related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 337296 'rolling = 'no'>

Save myback. php

<HTML>
<Head>
<Title> TK: Completely decrypts the underpants-hexie security team... </title>

</Head>


<Body>
<H4> MySQL database on tables to TXT... </H4>
</BR>
This is a PHP example. </br> </BR> #_
E-mail: go_root@hotmail.com </br> </BR> #_
Author: hyrz </br> </BR>
-------------------------------------------------------- </BR>
Start main OK ~
........

<Form action = "myback. php" method = "Post" name = "Submit">
<B> HOST: </B>
<Input type = "text" name = "host" value = "127.0.0.1: 3306"> </br> </BR>
<B> User: </B>
<Input type = "text" name = "user" value = "root"> </br> </BR>
<B> password: </B>
<Input type = "text" name = "pass" value = "123456"> </br> </BR>
<B> database check: </B>
<Input type = "text" name = "Database" value = "test"> </br> </BR>
<B> tables is: </B>
<Input type = "text" name = "table" value = "tab_member"> </br> </BR>
<B> new_data filename: </B>
<Input type = "text" name = "back_file" value = "data.txt"> </br> </BR>
<H6> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ </H6>
<Input type = "Submit" name = "Submit" value = "remove your pants as soon as you click">
</BR>
<H6> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ </H6>
</Form>
</>
</Body>

<? PHP
Set_time_limit (0 );
Error_reporting (e_all );
$ Db_host = $ _ post ["host"];
$ Db_user = $ _ post ["user"];
$ Db_pass = $ _ post ["pass"];
$ Db_database = $ _ post ["Database"];
$ Db_table = $ _ post ["table"];
$ Backdb_filename = $ _ post ["back_file"];

If (! Isset ($ db_host ))
{
Echo "MessageBox: Host error! ";
} Elseif (! Isset ($ db_user ))
{
Echo "MessageBox: user error! ";
} Elseif (! Isset ($ db_pass ))
{
Echo "MessageBox: Pass error! ";
} Elseif (! Isset ($ db_database ))
{
Echo "MessageBox: Database Error! ";
} Elseif (! Isset ($ db_table ))
{
Echo "MessageBox: Table error! ";
} Elseif (! Isset ($ backdb_filename ))
{
Echo "MessageBox: backdb_filename error! ";
} # Endif
If (! Is_dir ('data _ xiaosan '))
{
Mkdir ('data _ xiaosan ', 0777 );
} # Endif
$ SQL = mysql_connect ($ db_host, $ db_user, $ db_pass) or die ("cocould not connect:". mysql_error ());
Mysql_select_db ($ db_database, $ SQL) or die ("cocould not connect:". mysql_error ());
$ Result = mysql_query ("select * from $ db_table", $ SQL) or
Die ("cocould not connect:". mysql_error ());
$ I = 0;
$ TMP = '';
While ($ ROW = mysql_fetch_array ($ result, mysql_num )){
$ I = $ I + 1;
$ TMP. = implode (":", $ row). "\ n ";
If (! ($ I % 500 )){
$ Filename = 'data _ xiaosan/'. intval ($ I/500).' _ $ backdb_filename ';
File_put_contents ($ filename, $ TMP );
$ TMP = '';
} # Endif
} # Endwhile
Mysql_free_result ($ result );
Mysql_close ($ SQL );
Die ("MessageBox: Data Write success !!! ");

?>

</Html>

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/337296.html pageno: 9.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.