定制 iamjohndev/ijd-ezbackup 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iamjohndev/ijd-ezbackup

最新稳定版本:1.0.0

Composer 安装命令:

composer require iamjohndev/ijd-ezbackup

包简介

A simple and lightweight PHP library for backing up MySQL database.

README 文档

README

EZBackup is a PHP class library for backing up and restoring MySQL databases to/from CSV, JSON, and XLS files.

Installation

You can install EZBackup via Composer. If you're not familiar with Composer, you can learn more about it here.

First, make sure you have Composer installed on your machine. You can download and install Composer from here.

Next, navigate to your project directory in the terminal/command prompt.

Run the following command to install EZBackup and its dependencies:

    composer require iamjohndev/ijd-ezbackup

Once Composer has finished installing the library, you can start using it in your project.

Usage

To use EZBackup, you'll first need to create an instance of the BackupAndRestore class and set its configuration. Here's an example:

use IamJohnDevEZBackup\BackupAndRestore;

// Create a new BackupAndRestore object
$backup = new BackupAndRestore();

// Set the database configuration
$backup->setConfig('localhost', 'username', 'password', 'database', 'path/to/export_file', 'path/to/import_file');

Once you`ve set the configuration, you can call any of the available backup/restore methods:

// Backup the database to a CSV file
$backup->backupToCSV();

// Backup the database to a JSON file
$backup->backupToJSON();

// Backup the database to an XLS file
$backup->backupToXLS();

// Restore the database from a CSV file
$backup->restoreFromCSV($_FILES['csv_file']);

// Restore the database from a JSON file
$backup->restoreFromJSON($_FILES['json_file']);

// Restore the database from an XLS file
$backup->restoreFromXLS($_FILES['xls_file']);

License

EZBackup is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-11