当我将 file_get_contents 与来自另一台服务器的 URL 一起使用时,出现以下错误。
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /home/test/public_html/.....
Warning: file_get_contents(): Failed to enable crypto in /home/test/public_html/...... on line 24
Warning: file_get_contents(https://......): failed to open stream: operation failed in /home/test/public_html/......php on line 24
这是我的第四个 VPS。前 3 个工作绝对正常,但这个由于某种原因给出了上述错误。此 VPS 上的设置是相同的。
备注:
当我使用时它起作用:
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
但是有些插件使用file_get_contents,由于更新我无法修改它。
可能是什么问题?
几天前我也经历过类似的情况此链接可能会