致命错误: Call to undefined function curl_init()

[0] ThrowableError in common.php line 1743

致命错误: Call to undefined function curl_init()

}
/**
* 向官方获取最新上线应用与风向标
* @return bool|mixed
*/
function getAppAndWindvaneByApi()
{
$apiAddress = 'https://www.rhaphp.com/service/api/windvane';
$curl = curl_init();
curl_setopt($curl, CURLOPT_TIMEOUT, 2);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curl, CURLOPT_URL, $apiAddress);
$res = curl_exec($curl);
curl_close($curl);
$data = @json_decode($res, true);

Call Stack

in common.php line 1743
at getAppAndWindvaneByApi() in Index.php line 134
at Index->complete()
at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
at App::invokeMethod([object(Index), 'complete'], []) in App.php line 595
at App::module(['install', 'index', 'complete'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) inApp.php line 456
at App::exec(['type' => 'module', 'module' => ['install', 'index', 'complete']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
at App::run() in start.php line 19
at require('C:\VR产品\wxsdk\th...') in index.php line 17
已邀请:

geeson

赞同来自: lianyq

你的环境没curl扩展

lianyq - 80

赞同来自:

这是安装时出现的,怎么解决?

要回复问题请先登录注册