RulingSite-S系统导致对中国台湾省许多大学数据库的随机访问。
& lt?服务器端编程语言(Professional Hypertext Preprocessor的缩写)
include(" init . Inc . PHP ");
get _ referer(false);
if ( empty( $_GET['文件名'] ) || empty( $_GET['标题'] ) || empty( $_GET['目录']))
{
Error_display( t_(“丢失文件下载参数”);
} www.2cto.com
$ file _ name = $ _ GET[' filename '];
$file_download = uploadpath()。"/".$_GET['dir']。"/".$ file _ name
$ file _ extension = get _ file _ extension($ file _ name);
if(strpos($ _ SERVER[' HTTP _ USER _ AGENT ']," MSIE "))
{
$ file _ save = ut F8 tobig 5($ _ GET[' title '])。"."。$ file _ extension
}
其他
{
$file_save = $_GET['title']。"."。$ file _ extension
}
$ file _ save = ereg _ replace("[\ \/:*?\ " & lt& gt|]"," _ ",$ file _ save);
if ( $file_extension == "php ")
{
退出(" & ltstrong & gt不能用于”。$file_extension。“文件!& lt/strong >;);
}
$ mime type = get _ file _ mime type($ file _ name);
if(strpos($ _ SERVER[' HTTP _ USER _ AGENT ']," MSIE 5 ")| | strpos($ _ SERVER[' HTTP _ USER _ AGENT ']," Opera 7)))
{
$ mime type = " application/x-download ";
}
ob _ end _ clean();
header(" Pragma:public ");
header(" Expires:0 ");
header(" Cache-Control:must-revalidate,post-check=0,pre-check = 0 ");
header(" Cache-Control:public ");
头(“内容-描述:文件传输”);
标题("内容类型:"。$ mime type);
header("内容-处置:附件;文件名= "。$ file _ save);
头("内容-传输-编码:二进制");
header( "Content-Length:"。filesize($ file _ download));
@ readfile(@ $ file _ download);
& gt