Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP:从android浏览器默认下载文件_Php_Android_Browser_Download - Fatal编程技术网

PHP:从android浏览器默认下载文件

PHP:从android浏览器默认下载文件,php,android,browser,download,Php,Android,Browser,Download,我有代码下载文件,例如: $path = "../wap/file/{$row['file_name']}"; $filename = $row['file_name']; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header

我有代码下载文件,例如:

$path = "../wap/file/{$row['file_name']}";
$filename = $row['file_name'];
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header('Content-Type: application/octetstream');
header("Content-Disposition: attachment; filename=\"$filename\"");
header('Content-Type: application/force-download');
header("Content-Type: application/save");
header("Content-Transfer-Encoding: binary");
header('Content-Description: File Transfer');
header("Content-Disposition: attachment; filename=\"{$row['file_name']}\"");
header('Content-Length: ' . filesize($path));
readfile($path);
当我通过Opera在android上下载文件时,下载成功。但如果安卓浏览器默认下载文件,下载失败