Update: 2026-07-05 17:56:53
This commit is contained in:
@@ -4,6 +4,19 @@ if (php_sapi_name() !== 'cli') {
|
|||||||
die("This script must be run from the command line (Terminal).\n");
|
die("This script must be run from the command line (Terminal).\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load .env for CLI
|
||||||
|
$envPath = __DIR__ . '/../.env';
|
||||||
|
if (file_exists($envPath)) {
|
||||||
|
$lines = file($envPath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||||
|
foreach ($lines as $line) {
|
||||||
|
if (strpos(trim($line), '#') === 0) continue;
|
||||||
|
$parts = explode('=', $line, 2);
|
||||||
|
if (count($parts) === 2) {
|
||||||
|
putenv(trim($parts[0]) . '=' . trim($parts[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
require_once __DIR__ . '/../core/Services/SiroGeminiService.php';
|
require_once __DIR__ . '/../core/Services/SiroGeminiService.php';
|
||||||
require_once __DIR__ . '/../core/Database/Database.php';
|
require_once __DIR__ . '/../core/Database/Database.php';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user