16 lines
615 B
PHP
16 lines
615 B
PHP
<?php
|
|
header("Content-Type: application/json");
|
|
$out = [];
|
|
$candidates = [
|
|
"/var/www/html/vendor/phpoffice/phpspreadsheet",
|
|
"/var/www/html/vendor/autoload.php",
|
|
"/opt/wevia-brain/vendor/phpoffice/phpspreadsheet",
|
|
"/opt/wevia-brain/vendor/autoload.php",
|
|
];
|
|
foreach ($candidates as $p) $out[$p] = file_exists($p) ? (is_dir($p)?"DIR":"FILE") : "MISSING";
|
|
|
|
// find any phpspreadsheet autoload
|
|
$find = @shell_exec("find /var/www /opt -maxdepth 6 -name "Spreadsheet.php" -path "*PhpSpreadsheet*" 2>/dev/null | head -3");
|
|
$out["spreadsheet_class"] = trim($find);
|
|
echo json_encode($out, JSON_PRETTY_PRINT);
|