【发布时间】:2011-05-30 07:57:25
【问题描述】:
如果我按以下方式直接链接*.exe文件,为什么:
<a href="http://download.domain.com/setup.exe">Download setup</a>
我没有收到 IE9 消息:“这种类型的文件可能会损坏您的计算机”,而使用以下 PHP 文件服务方法时,会弹出消息?
header("Content-type:application/octet-stream");
header("Content-Disposition: attachment; filename=setup.exe");
readfile("http://download.domain.com/setup.exe");
谢谢。
【问题讨论】:
-
可能是因为在第一个例子中,用户当前正在查看URL中的
blablah.exe,而在后者中可能是一种欺骗用户的形式?这是我能想到的唯一原因。
标签: php download internet-explorer-9 exe