我编写波纹管我自己的代码,我得到自动对焦*,我越来越厌倦这种每次荷兰国际集团内部服务器错误,请帮忙:PHP头,内部服务器错误
<?
function doer($str)
{
$d = base64_decode($str);
$a = explode('<||>',$d);
$v =array(
'path' => $a[0],
'size' => $a[1],
'type' =>$a[2]
);
return $v;
}
?>
<?
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT\n");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
$a= doer($_GET['d']);
$type = $a['type'];
header("Content-type: application/".$type.";\n"); //or yours?
header("Content-Transfer-Encoding: binary");
$filename = $a['path'];
$len = $a['size'];
header("Content-Length: $len;\n");
$outname="downfile.".$type;
header("Content-Disposition: attachment; filename=\"$outname\";\n\n");
$filename = 'http://example.com/tst/'.$a['path'];
readfile($filename);
?>
更多info: 此脚本应放在(http://example.com/tst/)上,并且所有文件都存储在(http://example.com/tst/downloads)中。还没有.htaccess文件
kaveh塔赫,注意回答Marc B!这是安全性的失败...用户可以获取您的服务器或应用程序的信息 – 2010-06-23 03:41:03