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