|
@@ -1,7 +1,8 @@
|
|
|
<?php
|
|
|
-define('CONF', parse_ini_file(__DIR__ . '/config.ini', true, INI_SCANNER_TYPED));
|
|
|
+const ROOT_PATH = __DIR__;
|
|
|
+define('CONF', parse_ini_file(ROOT_PATH . '/config.ini', true, INI_SCANNER_TYPED));
|
|
|
|
|
|
-define('DB', new PDO('sqlite:' . CONF['common']['root_path'] . '/db/servnest.db'));
|
|
|
+define('DB', new PDO('sqlite:' . ROOT_PATH . '/db/servnest.db'));
|
|
|
|
|
|
$locale = 'en';
|
|
|
foreach (explode(',', preg_replace('/[A-Z0-9]|q=|;|-|\./', '', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '')) as $client_locale) {
|
|
@@ -23,8 +24,8 @@ const PLACEHOLDER_DOMAIN = 'example'; // From RFC2606: Reserved Top Level DNS Na
|
|
|
const PLACEHOLDER_IPV6 = '2001:db8::3'; // From RFC3849: IPv6 Address Prefix Reserved for Documentation
|
|
|
const PLACEHOLDER_IPV4 = '203.0.113.42'; // From RFC5737: IPv4 Address Blocks Reserved for Documentation
|
|
|
|
|
|
-foreach (array_diff(scandir(CONF['common']['root_path'] . '/fn'), ['..', '.']) as $file)
|
|
|
- require CONF['common']['root_path'] . '/fn/' . $file;
|
|
|
+foreach (array_diff(scandir(ROOT_PATH . '/fn'), ['..', '.']) as $file)
|
|
|
+ require ROOT_PATH . '/fn/' . $file;
|
|
|
|
|
|
require 'pages.php';
|
|
|
|