Browse Source

add emptychache.php

tags/v1.0
parent
commit
1bd2518028
1 changed files with 39 additions and 0 deletions
  1. +39
    -0
      emptycache.php

+ 39
- 0
emptycache.php View File

@@ -0,0 +1,39 @@
<!doctype html>
<html>
<head><title>maintainance</title>
<style>
body {
background: white;
}
#message {
width:50vw;
margin:3em auto;
border:20px solid yellow;
padding: 1em;
font-family: mono;
font-weight: bold;
}
</style>
</head>

<?php

$dir = "tmp/";


$ls = scandir($dir);
$count = 0;
foreach($ls as $file) {
if(!strncmp(".",$file,1)) continue;
unlink($dir."".$file);
$count++;
}
?>
<body>
<div id="message">
<p>erased <?php echo $count; ?> files</p>
<p><a href="/">back to Homepage</a></p>
</div>
</body></html>


Loading…
Cancel
Save