无法加载资源:帧加载中断-Agian [英] Failed to load resource: Frame load interrupted - Agian
本文介绍了无法加载资源:帧加载中断-Agian的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有从伪造链接下载图片的代码.我查看了其他评论/站点,但没有任何帮助我找到恼人问题的解决方案:
I have code which downloads a picture from a fake link. I have looked at others comments / sites but nothing has helped me find the solution to the annoying :
无法加载资源:帧加载中断"
"Failed to load resource: Frame load interrupted"
我的php标头位于我读取GET值之后:
my php headers are after I read the GET value:
header("Pragma: public"); // required
header("Expires: 0");
header("Cache-Control: private",false); // required for certain browsers
//header('Content-Length: '. @filesize($id));
header('Content-Type: '.$mim);
header('Content-Disposition: attachment; filename="'.$date.basename($fileName).'"');
header('Content-Transfer-Encoding: binary');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
readfile($fileName);
我有一个jQuery脚本,它调用iframe下载文件:
and I have jQuery script which calls an iframe to download the file:
$('body').append('<iframe class="download" src="download.php?id='+downloading+'" style="visibility:hidden;" width="0" height="0"></iframe>');
我正确下载了文件,但在控制台中显示错误,请让我知道它是否可修复?
I downloads the file correctly, but shows an error in the console, please let me know if its fixable??
推荐答案
header("Pragma: public"); // required
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false); // required for certain browsers
header("Content-type: application/x-unknown"); // I always use this
header("Content-Disposition: attachment; filename='theFilename.ext'");
header("Content-Transfer-Encoding: binary");
header("Content-Length: 177998"); // you might want to set this
readfile('/the/url/to/theFilename.ext');
这将起作用;-)
这篇关于无法加载资源:帧加载中断-Agian的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文