file_get_contents下載一個https圖片,報錯如下Warning: file_get_contents(): Failed to enable cryptofailed to open stream: operation failed in已經(jīng)在php.ini 打開openssl擴展和 fopen url在phpinfo里面檢查已經(jīng)正確開啟 $arrContextOptions=array( "ssl"=>array( "verify_peer"=>false, "verify_peer_name"=>false,
),
);
// return file_get_contents($url);
return file_get_contents($url, false, stream_context_create($arrContextOptions));使用這段代碼同樣無效,仍然報此錯誤
- 0 回答
- 0 關注
- 2662 瀏覽
添加回答
舉報
0/150
提交
取消