您可以尝试这样的事情:
$file_name = 'file.avi';$file_url = 'http://www.myremoteserver.com/' . $file_name;header('Content-Type: application/octet-stream');header("Content-Transfer-Encoding: Binary"); header("Content-disposition: attachment; filename="".$file_name."""); readfile($file_url);exit;我刚刚测试了它,它对我有用。
请注意,为了
readfile能够读取远程URL,您需要
fopen_wrappers启用它。



