diff options
| author | Joe Carstairs <me@joeac.net> | 2026-08-11 21:44:26 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-08-11 21:44:26 +0100 |
| commit | 74b9185a404ace70030e57e0ad493478227a5eac (patch) | |
| tree | 5f32d05d842ef726412ead2932d9157fd2f1df58 /http/php/config.php | |
| parent | 4e73a59d76e8c4949908e766657f5d634d39fb67 (diff) | |
ansible installs joeac.net website
Diffstat (limited to 'http/php/config.php')
| -rw-r--r-- | http/php/config.php | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/http/php/config.php b/http/php/config.php index a83b493..cfe91d3 100644 --- a/http/php/config.php +++ b/http/php/config.php @@ -1,8 +1,10 @@ <?php namespace JoeacNet\Http\Config; +define("CONFIG", parse_ini_file(dirname(__FILE__, 2) . "/config.ini")); + function maxDailyEmails(): int|null { - $maxDailyEmails = getenv("MAX_DAILY_EMAILS"); + $maxDailyEmails = CONFIG["MAX_DAILY_EMAILS"]; if (!is_numeric($maxDailyEmails)) { return null; } @@ -11,50 +13,50 @@ function maxDailyEmails(): int|null function contactMailbox(): string|null { - return (string) getenv("CONTACT_MAILBOX"); + return (string) CONFIG["CONTACT_MAILBOX"]; } function contactMailboxName(): string|null { - return (string) getenv("CONTACT_MAILBOX_NAME"); + return (string) CONFIG["CONTACT_MAILBOX_NAME"]; } function localSmtpFrom(): string|null { - return (string) getenv("LOCAL_SMTP_FROM"); + return (string) CONFIG["LOCAL_SMTP_FROM"]; } function localSmtpFromName(): string|null { - return (string) getenv("LOCAL_SMTP_FROM_NAME"); + return (string) CONFIG["LOCAL_SMTP_FROM_NAME"]; } function localSmtpHost(): string|null { - return (string) getenv("LOCAL_SMTP_HOST"); + return (string) CONFIG["LOCAL_SMTP_HOST"]; } function localSmtpPort(): string|null { - return (string) getenv("LOCAL_SMTP_PORT"); + return (string) CONFIG["LOCAL_SMTP_PORT"]; } function localSmtpUser(): string|null { - return (string) getenv("LOCAL_SMTP_USER"); + return (string) CONFIG["LOCAL_SMTP_USER"]; } function localSmtpPass(): string|null { - return (string) getenv("LOCAL_SMTP_PASSWORD"); + return (string) CONFIG["LOCAL_SMTP_PASSWORD"]; } function dbScheme(): string|null { - return (string) getenv("DB_SCHEME"); + return (string) CONFIG["DB_SCHEME"]; } function dbPath(): string|null { - return (string) getenv("DB_PATH"); + return (string) CONFIG["DB_PATH"]; } |
