Auto-deploy: 2026-05-17 01:45:10
This commit is contained in:
@@ -24,9 +24,13 @@ use Dompdf\Dompdf;
|
||||
use Dompdf\Options;
|
||||
use Dotenv\Dotenv;
|
||||
|
||||
// Load .env if it exists
|
||||
if (file_exists(__DIR__ . '/.env')) {
|
||||
$dotenv = Dotenv::createImmutable(__DIR__);
|
||||
// Path to the .env file located outside the document root for security
|
||||
// Assuming script is in /home/user/htdocs/domain.com/cv/server/
|
||||
// and .env is in /home/user/
|
||||
$envPath = realpath(__DIR__ . '/../../../..');
|
||||
|
||||
if ($envPath && file_exists($envPath . '/.env')) {
|
||||
$dotenv = Dotenv::createImmutable($envPath);
|
||||
$dotenv->load();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user