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

http://laravel.com/

http://kejyun.github.io/Laravel-4-Docum ... roduction/
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

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

文章 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();
            }
回覆文章

回到「laravel」