<p>原代码:</p><pre class="brush:php;toolbar:false"><?php
$response=file_get_contents("https://web/findAddressCandidates?Street=&SingleLine=3042+N+1050+W&outFields=*&outSR=102100&searchExtent=&f=json");
echo$response;?>
报错file_get_contents():SSLoperationfailedwithcode1.OpenSSLErrormessages:error:14090086:SSL...</pre><p>修改后</p><pre class="brush:php;toolbar:false"><?php
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$response=file_get_contents("https://wev/findAddressCandidates?Street=&SingleLine=3042+N+1050+W&outFields=*&outSR=102100&searchExtent=&f=json",false,stream_context_create($arrContextOptions));
echo$response;?></pre><p>帮助文档:http://php.net/manual/en/migration56.openssl.php</p>