Move into nested docroot
This commit is contained in:
parent
83a0d3a149
commit
c8b70abde9
13405 changed files with 0 additions and 0 deletions
web/core/scripts
27
web/core/scripts/dump-database-d8-mysql.php
Normal file
27
web/core/scripts/dump-database-d8-mysql.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* A command line application to dump a database to a generation script.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Command\DbDumpApplication;
|
||||
use Drupal\Core\DrupalKernel;
|
||||
use Drupal\Core\Site\Settings;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
if (PHP_SAPI !== 'cli') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Bootstrap.
|
||||
$autoloader = require __DIR__ . '/../../autoload.php';
|
||||
require_once __DIR__ . '/../includes/bootstrap.inc';
|
||||
$request = Request::createFromGlobals();
|
||||
Settings::initialize(dirname(dirname(__DIR__)), DrupalKernel::findSitePath($request), $autoloader);
|
||||
$kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod')->boot();
|
||||
|
||||
// Run the database dump command.
|
||||
$application = new DbDumpApplication();
|
||||
$application->run();
|
Reference in a new issue