jquery モバイル アプリケーション (デスクトップとモバイル デバイスの両方で実行) でファイルのリストを表示する必要があります。主にデスクトップから、リストからファイルをダウンロードする必要があります。次のような単純な href があります。
<a href="download.php?file=test.txt">test.txt<a>
問題は、ユーザーがリンクをクリックすると、ファイルの実際の内容が表示されることです。ユーザーがファイルをローカルに保存できるようにしたい。ヘッダーを正しく設定していると思います。これは、ヘッダーの Firebug ダンプです。
Response Headers
Accept-Ranges bytes
Cache-Control public, must-revalidate, post-check=0, pre-check=0
Connection Keep-Alive
Content-Disposition attachment; filename="test.txt"
Content-Length 95
Content-Type application/octet-stream
Date Mon, 25 Mar 2013 17:35:26 GMT
Expires -1
Keep-Alive timeout=5, max=99
Pragma public
Server Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips
Request Headers
Accept text/html, */*; q=0.01
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Cookie PHPSESSID=bbf2549f793aed8565b44d532a3088dc; path=%2F; fileDownload=true
Host 192.168.1.225
Referer http://192.168.1.225/
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
X-Requested-With XMLHttpRequest
Windows ボックスのブラウザーからテストしています。
ここで何が欠けていますか?