1 Star 0 Fork 1

lioulier/kityminder

forked from heycyril/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!';
}
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/superproduct/kityminder.git
git@gitee.com:superproduct/kityminder.git
superproduct
kityminder
kityminder
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385