日本三级片在线观看视频_西西大胆午夜人体视频无码_少妇无码一区二区_亚洲天堂超碰_极品少妇被猛的白浆直流_91精品云霸高清中文字幕_草草五月天伊人_久久少妇无码专区_欧美激欧美啪啪5老太_日韩在线在线成人

幫助中心 >  技術(shù)知識(shí)庫(kù) >  網(wǎng)站相關(guān) >  程序開(kāi)發(fā) >  file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

2019-01-09 22:30:08 475

方法一:(我自己試過(guò)了,可以用)

You can get around this problem by writing a custom function that uses curl, as in:


function file_get_contents_curl( $url ) {

 

  $ch = curl_init();

 

  curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );

  curl_setopt( $ch, CURLOPT_HEADER, 0 );

  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );

  curl_setopt( $ch, CURLOPT_URL, $url );

  curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );

 

  $data = curl_exec( $ch );

  curl_close( $ch );

  return $data;}

Then just use file_get_contents_curl instead of file_get_contents whenever you're calling a url that begins with https.



方法二:

I fixed this by making sure that that OpenSSL was installed on my machine and then adding this to my php.ini:


openssl.cafile=/usr/local/etc/openssl/cert.pem


提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問(wèn)題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問(wèn)題: