我想重定向到一個下載exe文件。在Internet Explorer中,如果我想運行或保存文件,瀏覽器會自動提問。在chrome中只獲取另存爲文件。我如何在IE中做與Chrome一樣的操作?HTML重定向下載exe文件
謝謝
<!DOCTYPE html>
<html>
<head>
<?php
$file_url = 'file://suas105/deployment/PnS_Token_WIPG-300H/WIPG-300H/WIPG-300H.exe';
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: Binary");
header("Location: $url");
header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\"");
readfile($file_url);
?>
<!--<meta charset="UTF-8">
<meta http-equiv="refresh" content="1; url=file://suas105/deployment/PnS_Token_WIPG-300H/WIPG-300H/WIPG-300H.exe" />-->
<title>Page redirection</title>
</head>
<body>
<!--If you are not redirected automatically, follow the <a href='file://suas105/deployment/PnS_Token_WIPG-300H/WIPG-300H/WIPG-300H.exe' download>link to example</a>-->
</body>
</html>
我不認爲你可以,我相當肯定,鉻不會讓你從瀏覽器運行exe文件 – Epodax