0
我有一个类似https://mypdf.pdf的远程PDF,我想发送到其他服务。使用Guzzle上传PDF 6
我狂饮代码:
$responseClient = $this->clientGuzzle->request(
'POST', "url", [
'multipart' => [
[
'name' => $name,
'filename' => $name,
'contents' => fopen($pdf,'rb'),
'headers' => [
'Content-Type' => 'application/pdf',
'Content-Transfer-Encoding' => "binary",
]
],
],
]
);
我fopen
是假的。
链接中的PDF是否存在?是否启用了allow_url_fopen?有没有通知或警告? – Finwe