通过访问https://api.weixin.qq.com进行身份认证,返回如下错误,file_get_contents(): SSL: Connection reset by peer,请问如何解决?
建议使用curl函数访问https链接。
file_get_contents 参考下面代码试试
$arrContextOptions = array( "ssl" => array( "allow_self_signed" => true, "verify_peer" => false, "verify_peer_name" => false, ), ); file_get_contents("https://域名/", false, stream_context_create($arrContextOptions));