<?php
//下载文件
define('IN_ADMIN',True);
require_once('include/common.php');
get_login($_USER->id);
$filename=str_replace('..','',$_GET['urls']);
$filename=str_replace('./','',$filename);
$phps=explode('/',$filename);
if($phps[0].$phps[1]!='datauploadfile'){
	echo '下载失败！';
	exit;
}
//$filename=dirname(__FILE__).'/'.$filename;
$blogurl = 'http://'.$_SERVER['SERVER_NAME'].'/';
$out_filename = iconv("UTF-8","GB2312",$_GET['filename']);
//echo $blogurl.$filename;
//exit;
header("Content-type:application/octet-stream");
header("Accept-Ranges:bytes");
header("Content-transfer-encoding: binary");
header("Content-Type:application/force-download");
header("Content-Disposition:inline;filename=".$out_filename);
header("Accept-Length:".filesize($filename));
readfile($filename);//要下的文件,包括路径
?>

