21 lines
911 B
PHP
Executable File
21 lines
911 B
PHP
Executable File
<?php
|
|
|
|
use Symfony\Component\Dotenv\Dotenv;
|
|
$_SERVER['PANTHER_WEB_SERVER_DIR'] = __DIR__ .'/../web/';
|
|
require dirname(__DIR__).'/vendor/autoload.php';
|
|
|
|
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
|
|
require dirname(__DIR__).'/config/bootstrap.php';
|
|
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
|
|
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
|
}
|
|
|
|
if (file_exists(__DIR__ . '/../var/test.sqlite')) {
|
|
unlink(__DIR__ . '/../var/test.sqlite');
|
|
}
|
|
//system('sqlite3 '. __DIR__ . '/../var/test.sqlite < ' . __DIR__ .'/article.sql');
|
|
//system('sqlite3 '. __DIR__ . '/../var/test.sqlite < ' . __DIR__ .'/sqlite.sql');
|
|
system('mysql -u root --password=Wichtig1 -h mysql --execute="drop database psc_test"');
|
|
system('mysql -u root --password=Wichtig1 -h mysql --execute="create database psc_test"');
|
|
system('mysql -u root --password=Wichtig1 -h mysql psc_test < '.__DIR__.'/mysql.sql');
|