4. <?php
if(isset($_POST["txt"])) {
$i = 0;
$files=glob('cache/text/*');
foreach($files as $file) {
if(false !== strpos($file, $_POST['txt'])) {
unlink($file);
$i++;
}
}
echo "清除成功!共清除{$i}个。<br/>";
}
echo '<form action="admin.php" method="post">
<input type="text" name="txt" /> <input type="submit" value="清除" />
</form>';
?>
@红袖