This commit is contained in:
2024-08-31 18:14:17 +05:30
parent 0fef0a3570
commit bde2d88ddf
8 changed files with 8 additions and 10 deletions

BIN
htdocs/.DS_Store vendored

Binary file not shown.

7
htdocs/.env.example Normal file
View File

@@ -0,0 +1,7 @@
#This is an example of secret environmental variables
#original environmental variable should be created with .env filename
DOMAIN = "Your Domain Name Here"
DB_HOST = "Your Database Host Name Her"
DB_USER = "Your Database Username Here"
DB_PASS = "Your Database Password Here"
DB_NAME = "Your Database Name Here"

Binary file not shown.

BIN
htdocs/core/.DS_Store vendored

Binary file not shown.

View File

@@ -1,7 +1,9 @@
<?php
// Load environment variables
// Load Composer's autoloader
require_once __DIR__ . '/vendor/autoload.php'; // Correct path for vendor directory in core
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../../');
// Initialize dotenv and load environment variables
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../'); // Adjusted to point to htdocs/.env
$dotenv->load();
// Database configuration

View File

@@ -1,5 +1,4 @@
<?php
// Enable error reporting
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
@@ -7,15 +6,12 @@ error_reporting(E_ALL);
// Include the configuration file
include "core/config.php";
// Start session management
session_start();
// Include Composer's autoloader
require_once __DIR__ . '/core/vendor/autoload.php';
// Initialize dotenv and load environment variables
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
// Retrieve environment variables
@@ -129,7 +125,7 @@ include "assets/_header.php";
</section>
</main>
<?php include 'assets/_footer.php'; ?>
<script src="assets/js/home.js"></script>
<script src="assets/js/_home.js"></script>
<script src="assets/js/developer_tools.js"></script>
</body>
</html>