1 Star 0 Fork 0

lpe234/kityminder

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
download.php 927 Bytes
一键复制 编辑 原始数据 按行查看 历史
techird 提交于 2014-10-09 19:32 . bug fix
<?php
/**
* 导出文件代理
*
* @author Jinqn, techird
*/
$type = $_REQUEST['type'];
if (isset($_REQUEST['content'])) {
$content = $_REQUEST['content'];
if ($type == 'base64') {
$content = base64_decode($content);
}
$filename = htmlspecialchars($_REQUEST["filename"]);
if (!$filename) {
$filename = "kikyminder";
}
if (isset($_REQUEST['iehack'])) {
$filename = urlencode($filename);
}
header("Content-type: application/octet-stream; charset=utf8; name=".urlencode($filename));
header("Accept-Length: ".strlen($content));
header("Content-Length: ".strlen($content));
header("Content-Disposition: attachment; filename=".$filename);
header('Content-Description: File Transfer');
if (isset($_REQUEST['stamp'])) {
setcookie($_REQUEST['stamp'], 1, time() + 30);
}
echo $content;
} else {
echo 'Empty Content!';
}
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lpe234/kityminder.git
git@gitee.com:lpe234/kityminder.git
lpe234
kityminder
kityminder
master

搜索帮助