Download the PHP package twothink/twothink-database without Composer

On this page you can find all versions of the php package twothink/twothink-database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twothink-database

twothink-database

数据库备份还原优化扩展

使用composer进行安装

     composer require twothink/twothink-database dev-master

使用composer update进行安装

    "require": {
        "twothink/twothink-database": "dev-master"
    },

引入类文件

use twothink\Database;
//facade模式
use twothink\facade\Database; 

文件命名规则,请严格遵守(温馨提示)

$file=['name'=>date('Ymd-His'),'part'=>1]

获取数据库表列表

$list  = Database::getDataList();

优化表

$table = ["twothink_action","twothink_action_log","twothink_addons"];
//$table = "twothink_action";
$list  = Database::optimize($table);

修复表

$table = ["twothink_action","twothink_action_log","twothink_addons"];
//$table = "twothink_action";
$list  = Database::repair($table);

备份表配置

//备份配置
$config = [
            'path' => realpath('./data') . DIRECTORY_SEPARATOR
            ,'part' => 20971520
            ,'compress' => 0
            ,'level' => 9
        ];
//生成备份文件信息
$file = ['name' => date('Ymd-His', time()), 'part' => 1];
Database::setAttr(['config'=>$config,'file'=>$file]);

备份表初始化

//备份配置
$config = [
            'path' => realpath('./data') . DIRECTORY_SEPARATOR
            ,'part' => 20971520
            ,'compress' => 0
            ,'level' => 9
        ];
//生成备份文件信息
$file = ['name' => date('Ymd-His', time()), 'part' => 1];
Database::Backup::setAttr(['config'=>$config,'file'=>$file])->backupinit($tables);//备份初始化检测
Database::create();//创建备份文件

备份表

Database::setAttr(['config'=>$config,'file'=>$file])->backup($table, 0);

备份数据列表

Database::fileList($path);

删除备份文件

Database::delFile($time,$path=false)

下载备份文件

Database::downloadFile($time);

还原导入

Database::import($start)

All versions of twothink-database with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package twothink/twothink-database contains the following files

Loading the files please wait ....