PHP file_get_contents()无法打开流错误

时间:2012-01-11 14:07:42

标签: php amazon-web-services

我正在尝试连接到Amazon Flexible Payments沙箱,我在他们的文档中指示了一个请求字符串。现在我尝试使用file_get_contents()PHP函数向他们的服务发送请求,但是我收到此错误:

[<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in file_name.php on line 84

知道为什么会这样吗?

以下是我发送的网址:

https://authorize.payments-sandbox.amazon.com/cobranded-ui/actions/start?SignatureVersion=2&returnUrl=http%3A%2F%2Fwww.problemio.com%2Fproject.php%3Fproject_id%2FProject_name%3 &paymentReason=donation&callerReference=YourCallerReference&callerKey=not_shown&transactionAmount=4.0&pipelineName=SingleUse&Signature=not_shown_in_SO%3D%3D

2 个答案:

答案 0 :(得分:3)

你有空格:…SignatureVersion=2 &returnUrl=……Project_name%3 &paymentReason…

答案 1 :(得分:1)

您在网址中留下了一个空格,打破了它:

.../start?SignatureVersion=2 &returnUrl=http%3A%2F%2Fwww.problemio.c...