7 Star 5 Fork 3

Gitee 极速下载/phpredisadmin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/ErikDubbelboer/phpRedisAdmin
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ttl.php 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
Wildan M 提交于 2025-03-29 13:04 +08:00 . Change TTL input type (#217)
<?php
require_once 'includes/common.inc.php';
global $redis, $config, $csrfToken, $server;
if (isset($_POST['key'], $_POST['ttl'])) {
if ($_POST['ttl'] == -1) {
$redis->persist($_POST['key']);
} else {
$redis->expire($_POST['key'], $_POST['ttl']);
}
header('Location: view.php?key='.urlencode($_POST['key']));
die;
}
$page['css'][] = 'frame';
$page['js'][] = 'frame';
require 'includes/header.inc.php';
?>
<h2>Edit TTL</h2>
<form action="<?php echo format_html(getRelativePath('ttl.php'))?>" method="post">
<input type="hidden" name="csrf" value="<?php echo $csrfToken; ?>" />
<p>
<label for="key">Key:</label>
<input type="text" name="key" id="key" size="30" <?php echo isset($_GET['key']) ? 'value="'.format_html($_GET['key']).'"' : ''?>>
</p>
<p>
<label for="ttl"><abbr title="Time To Live">TTL</abbr>:</label>
<input type="number" min="-1" name="ttl" id="ttl" size="30" <?php echo isset($_GET['ttl']) ? 'value="'.format_html($_GET['ttl']).'"' : ''?>> <span class="info">(-1 to remove the TTL)</span>
</p>
<input type="submit" class="button" value="Edit TTL">
</form>
<?php
require 'includes/footer.inc.php';
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mirrors/phpredisadmin.git
git@gitee.com:mirrors/phpredisadmin.git
mirrors
phpredisadmin
phpredisadmin
master

搜索帮助