Adjust PHP script 'Files/opcache_clear.php'.
This commit is contained in:
@@ -43,6 +43,8 @@ if (isset($_GET['logout'])) {
|
||||
h1 { font-size: 1.4em; }
|
||||
input[type="text"], input[type="password"] { width: 100%; padding: 0.5em; margin-top: 0.3em; }
|
||||
input[type="submit"] { padding: 0.6em 1.2em; margin-top: 1em; }
|
||||
.button-block { margin-bottom: 1em; }
|
||||
.separator { border-top: 1px solid #ccc; margin: 1.5em 0; }
|
||||
.status { margin-top: 1em; padding: 1em; background: #eef; border-left: 4px solid #99f; }
|
||||
.error { color: red; }
|
||||
.logout { float: right; }
|
||||
@@ -63,10 +65,6 @@ if (isset($_GET['logout'])) {
|
||||
<a href="?logout=1">Abmelden</a>
|
||||
</div>
|
||||
<h1>OPCache-Verwaltung</h1>
|
||||
<form method="post">
|
||||
<input type="submit" name="clear" value="OPCache jetzt leeren">
|
||||
</form>
|
||||
|
||||
<div class="status">
|
||||
<?php
|
||||
if (function_exists('opcache_get_status') && function_exists('opcache_reset')) {
|
||||
@@ -75,7 +73,14 @@ if (isset($_GET['logout'])) {
|
||||
echo "ℹ️ OPCache ist installiert, aber aktuell nicht aktiviert.";
|
||||
} else {
|
||||
echo "✅ OPCache ist aktiviert.<br>";
|
||||
|
||||
// Zeige Button nur wenn aktiv
|
||||
echo '<form method="post" class="button-block">';
|
||||
echo '<input type="submit" name="clear" value="OPCache jetzt leeren">';
|
||||
echo '</form>';
|
||||
|
||||
if (isset($_POST['clear'])) {
|
||||
echo '<div class="separator"></div>';
|
||||
if (opcache_reset()) {
|
||||
echo "✅ OPCache wurde erfolgreich geleert.";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user