suchen

Heim  >  Fragen und Antworten  >  Hauptteil

laravel - Guzzle, PHP HTTP client 发送https请求报错

laravel5中使用Guzzle, PHP HTTP client发送HTTPS请求怎么搞 https://github.com/guzzle/guzzle
发送post请求报错
cURL error 60: See http://curl.haxx.se/libcurl/c...
CURLE_SSL_CACERT (60)
Peer certificate cannot be authenticated with known CA certificates.

巴扎黑巴扎黑2791 Tage vor1233

Antworte allen(1)Ich werde antworten

  • ringa_lee

    ringa_lee2017-05-16 13:10:58

    $client->setDefaultOption('verify', false);

    或者

    # 证书 https://github.com/guzzle/guzzle/blob/4.2.3/src/cacert.pem
    $client = new \GuzzleHttp\Client(['verify' => '/full/path/to/cert.pem']);

    Antwort
    0
  • StornierenAntwort