commit
This commit is contained in:
9
public/tools/config-doctor.php
Normal file
9
public/tools/config-doctor.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
$path = realpath(__DIR__ . '/../../inc/config.php');
|
||||
$out = ['path_expected'=>$path,'exists'=>false,'readable'=>false,'type'=>null,'keys'=>[], 'notes'=>[]];
|
||||
if (is_file($path)) { $out['exists']=true; $out['readable']=is_readable($path);
|
||||
try { $cfg = require $path; $out['type']=gettype($cfg); if (is_array($cfg)) { $out['keys']=array_keys($cfg); } }
|
||||
catch (Throwable $e) { $out['notes'][] = $e->getMessage(); }
|
||||
} else { $out['notes'][]='file not found'; }
|
||||
echo json_encode($out, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
||||
Reference in New Issue
Block a user