1. Go to this page and download the library: Download dimtrovich/db-dumper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dimtrovich / db-dumper example snippets
use PDO;
$pdo = new PDO('mysql:host=localhost;port=3307;dbname=database', 'username', 'password');
use Dimtrovich\DbDumper\Exporter;
use Exception;
try {
$exporter = new Exporter($pdo, 'database');
$exporter->process('storage/work/dump.sql');
} catch (Exception $e) {
echo 'db-dumper error: ' . $e->getMessage();
}