Files
html/api/ocreset.php
2026-04-12 22:57:03 +02:00

17 lines
494 B
PHP

<?php
header('Content-Type: application/json');
$r = ['opcache_reset' => false, 'opcache_invalidate' => []];
if (function_exists('opcache_reset')) {
$r['opcache_reset'] = opcache_reset();
}
$files = [
'/opt/wevia-brain/wevia-master-router.php',
'/var/www/html/api/wevia-master-api.php',
];
foreach ($files as $f) {
if (function_exists('opcache_invalidate')) {
$r['opcache_invalidate'][$f] = opcache_invalidate($f, true);
}
}
echo json_encode($r, JSON_PRETTY_PRINT);