Php backup database code (1/10) _ PHP Tutorial

Source: Internet
Author: User
Php backup database code (110 ). Php backup database code this is a phpmysql database backup and restoration backup code, you can freely back up your website database, you can also restore oh, this program generates php backup database code. this is a php mysql database backup and restoration backup code. you can back up the database on your website and restore it at will, this program generates. SQL database files, you can also use other tools to import, convenient, generate SQL database backup statements, so good compatibility.

// Php Tutorial backup database tutorial code

This is a php mysql tutorial database backup and restoration backup code. you can back up the database on your website and restore it at will. SQL database files, you can also use other tools to import, convenient, generate SQL database backup statements, so good compatibility.
*/
?>
Inport. php

/**
* Database backup program
*
* @ Author: Huang Le
* @ Version: 1.0
* @ Lastupdate: 2010-7-19
*
*/

Include ("config/config. php ");
Include ("des/dbbackup. class. php ");
Include ("includes/msg. class. php ");
$ Dbbackup = new dbbackup ($ dbhost, $ dbuser, $ dbpwd, $ dbname );
$ Msg = new msg ();
$ Bakfile = $ dbbackup-> get_backup (); // Obtain the backup file
If ($ _ get ['FN ']) {
If ($ dbbackup-> import ($ _ get ['FN ']) {// import Data
$ Str = "Congratulations!
The backup data has been imported! "; // Prompt information
$ Msg-> show_msg ($ str, 'import. php', 'export. php'); // the system prompts that the import is successful.
}
}
// Delete the backup file
If ($ _ post ['sub']) {
Echo $ dbbackup-> del ($ _ post ['choice'])? $ Msg-> show_msg ("Congratulations
The backup file has been deleted! ", 'Import. php', 'export. php'): $ msg-> show_msg (" deletion failed! ", 'Import. php', 'import. php ');
}
?>

1 2 3 4 5 6 7 8 9 10

Http://www.bkjia.com/PHPjc/630827.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/630827.htmlTechArticlephp backup database code this is a php mysql database backup and restoration backup code, you can casually back up your website database, but also can restore oh, this program generates...

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.