<?php
/**
 * Test BASE_PATH definition
 */

echo "<h1>BASE_PATH Test</h1>";

// Define BASE_PATH
if (!defined('BASE_PATH')) {
    define('BASE_PATH', __DIR__);
    echo "<p>BASE_PATH defined as: " . BASE_PATH . "</p>";
} else {
    echo "<p>BASE_PATH already defined as: " . BASE_PATH . "</p>";
}

// Try to load config
echo "<h2>Loading config.php</h2>";
try {
    require_once BASE_PATH . '/config/config.php';
    echo "<p style='color:green'>✓ config.php loaded successfully</p>";
    
    echo "<ul>";
    echo "<li>BASE_PATH: " . (defined('BASE_PATH') ? BASE_PATH : 'Not defined') . "</li>";
    echo "<li>BASE_URL: " . (defined('BASE_URL') ? BASE_URL : 'Not defined') . "</li>";
    echo "<li>UPLOAD_PATH: " . (defined('UPLOAD_PATH') ? UPLOAD_PATH : 'Not defined') . "</li>";
    echo "<li>LOGS_PATH: " . (defined('LOGS_PATH') ? LOGS_PATH : 'Not defined') . "</li>";
    echo "</ul>";
} catch (Exception $e) {
    echo "<p style='color:red'>Error: " . $e->getMessage() . "</p>";
}