1 頁 (共 1 頁)

ixudra/curl OSX SSL: CA certificate set, but certificate ver

發表於 : 2017-04-03 22:23:41
yehlu
OSX 出現 SSL: CA certificate set, but certificate verification is disabled

代碼: 選擇全部

            if (PHP_OS == 'Darwin') {
                $response = Curl::to($url)
                    ->withOption('SSL_VERIFYPEER', true)
                //->enableDebug(storage_path() . '/logs/curl.log')
                //->returnResponseObject()
                    ->get();
            } else {
                $response = Curl::to($url)
                    ->get();
            }