Update: 2026-06-16 02:52:06

This commit is contained in:
Hamza-Ayed
2026-06-16 02:52:06 +03:00
parent 2c657fa0b4
commit c0fe990ebe
11 changed files with 162 additions and 324 deletions

View File

@@ -1,12 +1,17 @@
<?php
function loadEnvironment() {
$externalEnv = '/home/intaleq-walletintaleq/env/.env';
if (file_exists($externalEnv)) {
$env_file = $externalEnv;
function loadEnvironment($env_file = null) {
if ($env_file && file_exists($env_file)) {
// use provided path
} else {
error_log("❌ .env not found in both locations.");
$env_file = '/home/intaleq-walletintaleq/env/.env';
if (!file_exists($env_file)) {
$env_file = __DIR__ . '/../.env';
}
}
if (!file_exists($env_file)) {
error_log("❌ .env not found: $env_file");
return false;
}