這個報錯的解決方法也是在網(wǎng)上找到了一個不錯的解決方法践瓷,那就是如下圖:
$arrContextOptions=array("ssl"=>array("verify_peer"=>false,"verify_peer_name"=>false,),);
$response=file_get_contents("https://maps.co.weber.ut.us/arcgis/rest/services/SDE_composite_locator/GeocodeServer/findAddressCandidatesStreet=&SingleLine=3042+N+1050+W&outFields=*&outSR=102100&searchExtent=&f=json",false,stream_context_create($arrContextOptions));
echo $response;
?>
那就是在使用file_get_contents()方法之前添加一個數(shù)組參數(shù),然后就在這個方法里面給它添加上這個參數(shù)狰贯,然后你就能發(fā)現(xiàn)不會報錯啦~~