<?php




define('BASE_PATH', __DIR__);


define('DB_PATH', BASE_PATH . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'blog.sqlite');


define('DB_SCHEMA_VERSION', 4);


define('DB_ENABLE_WAL', true);
define('DB_BUSY_TIMEOUT_MS', 3000);


date_default_timezone_set('Asia/Shanghai');


if (!defined('APP_DEBUG')) {
    define('APP_DEBUG', false);
}

if (APP_DEBUG) {
    ini_set('display_errors', '1');
    error_reporting(E_ALL);
} else {
    ini_set('display_errors', '0');
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
}


ini_set('log_errors', '1');
$__blogLogDir = BASE_PATH . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'logs';
if (!is_dir($__blogLogDir)) {
    @mkdir($__blogLogDir, 0777, true);
}
ini_set('error_log', $__blogLogDir . DIRECTORY_SEPARATOR . 'php_errors.log');
