diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-10 22:18:58 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-10 22:18:58 +0500 |
| commit | d52f035dc0138375506c49c20a92fe566761af3a (patch) | |
| tree | 76e4140aad7c173b2f1b6e0e19136b5e482710c8 | |
| parent | d3de5a44085f53d80e736b769d5145130df86645 (diff) | |
fix: include paths
| -rw-r--r-- | lib/accounts.php | 4 | ||||
| -rw-r--r-- | lib/emote.php | 2 | ||||
| -rw-r--r-- | lib/partials.php | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/lib/accounts.php b/lib/accounts.php index 2ddb796..36f11af 100644 --- a/lib/accounts.php +++ b/lib/accounts.php @@ -1,5 +1,5 @@ <?php -include_once "config.php"; +include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php"; function authorize_user(bool $required = false): bool { @@ -26,8 +26,6 @@ function authorize_user(bool $required = false): bool return false; } - include_once "config.php"; - $db = new PDO(CONFIG['database']['url'], CONFIG['database']['user'], CONFIG['database']['pass']); $key = $_SERVER["HTTP_AUTHORIZATION"] ?? $_COOKIE["secret_key"]; diff --git a/lib/emote.php b/lib/emote.php index 38e4f01..14f6088 100644 --- a/lib/emote.php +++ b/lib/emote.php @@ -1,5 +1,5 @@ <?php -include_once "user.php"; +include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/user.php"; class Emote { diff --git a/lib/partials.php b/lib/partials.php index 5dc97d7..8de8c05 100644 --- a/lib/partials.php +++ b/lib/partials.php @@ -1,8 +1,8 @@ <?php +include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php"; + function html_navigation_bar() { - include_once "config.php"; - echo '' ?> <section class="navbar"> <a href="/" class="brand" style="color:black;text-decoration:none;"> |
