[英]PHP Android how to dowload apk file
我的服務器上有 Android 應用程序,還有 php 代碼,例如:
header('Content-Type: application/vnd.android.package-archive');
header('Content-Disposition: attachment; filename="test.apk"');
readfile('test.apk');
我的帶有默認網絡瀏覽器的手機正在以在屏幕上讀取 apk 文件的方式下載此文件。 我期待某種對話,例如:將其另存為或/以及您想將其保存在哪里。 我做錯了什么? 有沒有辦法自動保存它,意思是沒有任何對話?
嘗試:
header("Cache-Control: public");
header("Content-Description: File Transfer");
header('Content-Type: application/vnd.android.package-archive');
header("Content-Transfer-Encoding: binary");
header('Content-Disposition: attachment; filename="test.apk"');
readfile('C4A.apk');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.