I have a folder named Test. I have some .xls files and .txt , .doc files in it.詳細については、私の<a href="test.xls"> is working and .txt is not?
In the html I have
<p> <a href="../../Test/Stats.xls">Download excel file </a> </p>
- when I click on this link it is opening a download window (Working fine)
<p> <a href="../../Test/Stats.txt">Download Text file </a> </p>
<p> <a href="../../Test/Stats.doc">Download excel file </a> </p>
But these 2 are not working. Instead of opening a download window they are going to that .doc file link and saying that the page cannot be found.
why the download window is coming for .xls and not for .do or .doc? How can I fix this??
ページが見つかりませんか?ファイル名Stats.docとStats.txtは実際にフォルダ内に存在しますか? –
サーバーのMIMEタイプを調整する必要がある場合があります。 –
テキストファイル(.txt)のブラウザのデフォルトの動作は、Webページであり、ダウンロードするように指示されていないかのようにページを開くことです。それはなぜ404エラーを起こすのか説明しません。 IIS 7を使用している場合、許可された拡張子として.DOC/.DOCXと.TXTのMIMEタイプを持たない可能性があります。 IIS_USERアカウントへのアクセスを妨げる権限の問題がある可能性があります。 Fiddlerのようなユーティリティを使用してIISへのリクエストを監視し、HTTPステータスコードを確認しましたか?あなたはあなたのIISログをチェックしましたか? –