有人能给我一个关于这个S3问题的见解吗?无法检索电子邮件模板,即使它在那里。
fopen():未捕获的服务器错误\ n [详细信息] =>无法处理请求。请联系支持。\ n)\ n“,”日志“:”创建资源时出错。 [message] fopen(https://company-email-templates.s3.amazonaws.com/templates/Email-Open-Registration-Confirmation.txt):无法打开流:HTTP请求失败! \ n [file] /var/www/code_deploy/cfweb/releases/20190222083308/vendor/guzzle/guzzle/src/Guzzle/Stream/PhpStreamRequestFactory.php\n[line] 217
响应日志:
{
"Status Code": 500,
"Reason": "Internal Server Error",
"Details": "Array\n(\n [code] => server_error\n [description] => Uncaught Server Error\n [details] => Request could not be processed. Please contact Support.\n)\n",
"Log": "Error creating resource. [message] fopen(https:\/\/crossfit-email-templates.s3.amazonaws.com\/templates\/Email-Open-Registration-Confirmation.txt): failed to open stream: HTTP request failed! \n[file] \/var\/www\/code_deploy\/cfweb\/releases\/20190222121638\/vendor\/guzzle\/guzzle\/src\/Guzzle\/Stream\/PhpStreamRequestFactory.php\n[line] 217",
"Trace": "#0 [internal function]: Phalconry\\Mvc\\MvcApplication::Phalconry\\Mvc\\{closure}(Object(Phalcon\\Events\\Event), Object(Phalcon\\Mvc\\Dispatcher),
如果可能,请尝试使用cURL。
$ci = curl_init();
curl_setopt($ci, CURLOPT_URL, "https://company-email-templates.s3.amazonaws.com/templates/Email-Open-Registration-Confirmation.txt");
curl_setopt($ci, CURLOPT_RETURNTRANSFER, 1);
$file = curl_exec($ci);
curl_close($ci);
echo $file;