25 lines
741 B
PHP
25 lines
741 B
PHP
<?php
|
|
$config = parse_ini_file(__DIR__ . '/../config/flashii.ini');
|
|
require_once $config['msz-path'] . '/vendor/flashwave/index/index.php';
|
|
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
|
|
if(!is_file($config['msz-config-path'])) {
|
|
echo '{"error":101}';
|
|
exit;
|
|
}
|
|
|
|
$config = parse_ini_file($config['msz-config-path']);
|
|
|
|
if(empty($config['dsn'])) {
|
|
echo '{"error":102}';
|
|
exit;
|
|
}
|
|
|
|
try {
|
|
$db = \Index\Data\DbTools::create($config['dsn']);
|
|
$db->execute('SET SESSION time_zone = \'+00:00\', sql_mode = \'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION\';');
|
|
} catch(Exception $ex) {
|
|
echo json_encode(['error' => 103, 'msg' => $ex->getMessage()]);
|
|
exit;
|
|
}
|