Php &引用;wordpress";文件\u get\u contents():SSL操作失败,代码为1

Php &引用;wordpress";文件\u get\u contents():SSL操作失败,代码为1,php,wordpress,plugins,file-get-contents,Php,Wordpress,Plugins,File Get Contents,我有一个我创建的WordPress插件,它因为证书错误而停止工作 file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in 我联系了inmotionhosting,他们说证书没问题。有关守则如下: $op = file_get_

我有一个我创建的WordPress插件,它因为证书错误而停止工作

file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
我联系了inmotionhosting,他们说证书没问题。有关守则如下:

$op = file_get_contents(plugins_url( '../PRTHSEL_Visualizer.html' , __FILE__ ));

有人建议我使用https请求来获取文件。我已经搜索过如何通过https在WordPress插件中获取文件内容,但找不到答案。

问题是,文件\u get\u contents()被提供了一个本地文件的url。通过将路径更改为本地路径,它现在可以在PHP7下工作。默认情况下,PHP5从未验证SSL,但PHP7验证了。这个问题花费了我太多时间,我希望早点看到。