HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ubuntu-8gb-hel1-1 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.32
Disabled: NONE
Upload Files
File: /var/www/html/obaasimaghana/public/index.php
<?php
// Start session
session_start();

// Define base path constants
define('BASE_PATH', dirname(__DIR__));
define('APP_PATH', BASE_PATH . '/app');
define('CONFIG_PATH', BASE_PATH . '/config');
define('PUBLIC_PATH', BASE_PATH . '/public');

// Load configuration
require_once CONFIG_PATH . '/config.php';

// Load helper functions
require_once APP_PATH . '/helpers/functions.php';

// Load core files
require_once APP_PATH . '/core/Controller.php';
require_once APP_PATH . '/core/Database.php';

// Autoload classes
spl_autoload_register(function ($className) {
    // Convert class name to file path
    $paths = [
        APP_PATH . '/controllers/' . $className . '.php',
        APP_PATH . '/models/' . $className . '.php',
        APP_PATH . '/core/' . $className . '.php'
    ];

    // Try each possible path
    foreach ($paths as $path) {
        if (file_exists($path)) {
            require_once $path;
            return;
        }
    }
});

// Initialize core application
require_once APP_PATH . '/core/App.php';
$app = new App();