PHP强制文件下载
filepath='文件路径';
if(strpos($filepath,"http://")===false)
{
$downaddress="http://".$_SERVER['HTTP_HOST'].$filepath;
//header("Location:".$downaddress);
header("Content-Disposition: attachment; filename=".$myrow['filename']);
readfile($downaddress);
}
else
{
header('Location:'.$filepath);
}
//注意在该处理不能有任何的输出语句