<?php
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');

$dir = __DIR__;
$config1 = $dir . '/../config.php';
$config2 = $dir . '/config.php';

echo json_encode([
    '__DIR__' => $dir,
    'config_up_exists' => file_exists($config1),
    'config_here_exists' => file_exists($config2),
    'dir_contents' => scandir($dir . '/..'),
]);
