gpt4 book ai didi

php - 出于安全原因,curl_init() 已被禁用

转载 作者:行者123 更新时间:2023-12-04 01:18:01 28 4
gpt4 key购买 nike

$url= "http://api.stackoverflow.com/1.1/search?tagged=php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_ENCODING, ""); // this will handle gzip content
$result = curl_exec($ch);
curl_close($ch);
print $result;

错误

Warning: curl_init() has been disabled for security reasons on line 2

Warning: curl_setopt() has been disabled for security reasons on line 3

Warning: curl_setopt() has been disabled for security reasons on line 4

Warning: curl_setopt() has been disabled for security reasons on line 5

Warning: curl_setopt() has been disabled for security reasons on line 6

Warning: curl_exec() has been disabled for security reasons on line 7

Warning: curl_close() has been disabled for security reasons on line 8

我可以知道我的 Curl 不起作用的原因吗?

最佳答案

如果你在 xampp 上看下面

How to enable curl in xampp?

你应该只需要改变这个 php

C:\Program Files\xampp\php\php.ini

关于php - 出于安全原因,curl_init() 已被禁用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22075803/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com