Failed to load resource: Frame load interrupted - Agian

前端 未结 2 763
不知归路
不知归路 2021-01-18 00:12

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 :

\"Fail

2条回答
  •  长发绾君心
    2021-01-18 00:23

    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');
    

    This will work ;-)

提交回复
热议问题