我有一个网站,可将内容从远程服务器下载到客户端浏览器。它在localhost中可以正常运行,但是当我在000webhost中运行它时,出现404错误(either server or code makes a get request for https://api.omappapi.com/v1/optin/13439/673828 and fails when i use a Content-Length header)
。
上述资源的错误看起来像这样
code: 1006
error: "The campaign could not be retrieved. The following error was returned: A campaign with the ID 673828 does not exist."
status: 404
type: "campaign-error"
post
发出了mydomain/download
请求public function download(Request $request)
{
$url = $request->url;
header("Content-Type: video/mp4");
header("Content-Length : 804584");
header("Content-disposition:attachment; filename=video.mp4");
readfile($url);
return;
}
000webhost.com
上,当我使用Content-Length header
时收到错误消息。我该怎么做才能解决此错误?我没有在我的代码中向https://api.omappapi.com/v1/optin/13439/673828发送请求