Ben güçlü indir uygulamak olduğum bir wapsite var.
PHP ile olduğu
Tüm diğer mobil tarayıcılar için çok çalışır, ama ben android telefon kullanarak sitesine eriştiğinizde, bu gerçek php dosyasını indirir.
Aşağıdaki dosya downloadFiles.php benim kod parçacığını.
$fileExt = "jpg"; $strOrgFileName = "abc.jpg";
switch($fileExt) {
case "jpeg":
case "jpg": $ ctype = "image / jpg"; break;
case "gif": $ ctype = "image / gif"; break;
case "png": $ ctype = "image / png"; break;
case "zip": $ ctype = "application / zip"; break;
default: $ ctype = "application / force-indirme";
}
header ("Pragma: public");
header ("Expires: 0");
header ("Cache-Control: = 0 must-REVALIDATE, post-çek, pre-check = 0");
header ("Content-Type: $ ctype");
header ("Content-Açıklama: Dosya Transferi");
header ("Content-jar; filename = \".. "$ strOrgFileName" \ ";");
readfile ($ strOrgFileName);
Android sisteminde bu php dosyasını indirir.
yani. downloadFiles.php
Bu aracılığıyla yardım edin.