无法连接到本地主机端口1080:连接被拒绝

时间:2018-09-21 06:12:28

标签: php curl connection-refused

嗨,我正在使用以下代码:

function curl_get($url){        
    if (!function_exists('curl_init')){
        die('Sorry cURL is not installed!');
    } 
    $ch = curl_init();   
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_HEADER, 0); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($ch, CURLOPT_TIMEOUT, 30); 
    $response = curl_exec($ch);
    echo curl_error($ch);
    return $response;
}
echo  curl_get('http://gr8logics.com/'); die;

此代码在使用localhost的其他本地系统上有效,但在我的系统上不可用。我的卷曲功能已启用。我相信Windows更新后会发生这种情况,但我不知道已进行了哪些更改。我正在使用xampp 7.0。请帮忙!!!!

0 个答案:

没有答案