先上代码,文件下载代码 header('Pragma: public'); // required
header('Expires: 0'); // no cache
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private',false); header('Content-Type: '.$contenttype); header('Content-Disposition: attachment; filename="'.$name . '-' .$MatchNumber.'.'.$type); header('Content-Transfer-Encoding: binary'); header('Connection: close');
readfile($savepath);这段代码可以正常执行,在PC端没毛病,在安卓手机端浏览器下没问题。同时如果在安卓版微信端的浏览器中,可以唤起其他浏览器进行下载。PS:下载文件是通过PHPImage类合成的。现在遇到的问题是:1、苹果手机点击下载链接进过一系列程序处理完文件后到这边就一直没办法过去2、苹果手机微信端的内置浏览器也是同样的问题不知道有没有大佬曾经做过这一方面的开发。我查阅了好多资料没找到解决方法!对于手机端开发经验极度欠缺。特别是ios系统以及同系列的基本上没接触过。跪求高手支招。
添加回答
举报
0/150
提交
取消