Home page >> Related Tutorials >>Body

File_get_contents: OpenSSL Error messages: error: 14090086: SSL routes: ssl3_get_server_certificate

Author: A little Jack    Time: 2022-07-18 14:43:58    Browse: 873   

Error message: file_get_contents(): SSL operation failed with code 1. OpenSSL error messages: error: 14090086: SSL routes: ssl3_get_server_certificate: certificate verify failed

 File_get_contents: OpenSSL Error messages: error: 14090086: SSL routes: ssl3_get_server_certificate

Blogger's application works: the file_get_contents used by the light navigation theme get the website weight value. Today, I encountered a problem, which the blogger has never seen or understood. After today's problem, I checked for a long time and found no solution. I found a blogger in the blog park had posted similar articles, and after reading it, I solved the problem. Now I will share the code, The partners copied themselves when encountering this problem.

Original code

 $url=file_get_contents ("url link");

After modification

 $arrContextOptions=array(   "ssl"=>array(      "verify_peer"=>false,      "verify_peer_name"=>false,   ), ); $url=file_get_contents ("url link", false, stream_context_create ($arrContextOptions));

The blogger does not understand the OpenSSL problem, but after copying the code, the problem was really solved, and it was only shared for recording. If the gods have a better solution, you can share it in the comment area!


Text label: OpenSSL   file_get_contents  
 A little Jack

A little Jack https://lkba.cn

The blogger focuses on Z-Blog website construction, website optimization, computer troubleshooting, reinstallation, optimization, maintenance system, etc., QQ/WX: 2126245521 (please specify the purpose)

Related articles

Previous:

Next:

No comment for this article - Welcome

 Please fill in the verification code

Processed : 0.049 SQL : 14