<?php
header('Content-Type: application/json'); // Set content type to JSON

$jsonFilePath = '../../database/settings/profile.json';

// Check if the profile.json file exists
if (file_exists($jsonFilePath)) {
    // Read the JSON data from the file
    $jsonData = file_get_contents($jsonFilePath);
    
    // Return the JSON data directly
    echo $jsonData;
} else {
    // If the file doesn't exist, return an error message
    echo json_encode([
        'status' => 'error',
        'message' => 'Profile data not found.'
    ]);
}
?>
