【发布时间】:2012-03-04 18:31:18
【问题描述】:
注意:点击test1会下载110KB的图片。
test1 托管@托管文件的同一服务器 (dl5.nat.li)
test2 托管@外部服务器,报告“消失”
为什么 test1 有效,而 test2 无效?
它们都共享完全相同的index.php:
<?php
$secret = "mysecret";
$uri_prefix = "/dl/";
$f = "/4615c7b8822f5a1187246e83ff3023698c70077a/badresults-ziggo.png";
$t = time();
$t_hex = sprintf("%08x", $t);
$m = md5($secret.$f.$t_hex);
$url = 'http://dl5.nat.li'.$uri_prefix.$m.'/'.$t_hex.$f;
header('Content-Type: application/force-download');
header( 'Location: '.$url ) ;
?>
文件服务器上的Secdownload配置:
secdownload.secret = "mysecret"
secdownload.document-root = "/home/dlfolder/"
secdownload.uri-prefix = "/dl/"
secdownload.timeout = 30
我在这里不知所措。
【问题讨论】: