gpt4 book ai didi

php - 调用未定义函数 curl_init(),但已启用

转载 作者:行者123 更新时间:2023-12-02 22:17:24 26 4
gpt4 key购买 nike

我有 WAMP,我正在运行 PHP 5.3.13 和 Apache 2.2.22。

我通过勾选 php_curl 启用了扩展。我已经重新启动了我的电脑。

我的代码是这样的:

Fatal error: Call to undefined function curl_init() 

有人认为可能出了什么问题吗?

我的 phpinfo 没有说任何关于 curl 的信息,但在 phpini 中它说:

;extension=php_bz2.dll

扩展名=php_curl.dll.

调用它的代码在这里:

class ***** {
public static $oauth, $debug, $logger, $session_manager, $last_response;
protected static $url, $client_id, $client_secret, $secret, $ch, $headers;

const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const DELETE = 'DELETE';

public static function setup($client_id, $client_secret, $options = array('session_manager' => '*****Session')) {
// Setup client info
self::$client_id = $client_id;
self::$client_secret = $client_secret;

// Setup curl
self::$url = empty($options['api_url']) ? 'https://api.*****.com:443' : $options['api_url'];
self::$debug = false;
self::$ch = curl_init();

此代码来自可信赖的 API。我已经给不需要分享的词加了星标。

最佳答案

在此处用正确的版本替换在 ext 文件夹中找到的 dll 文件:

http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/

我使用的是 win 8 64bit,所以我的版本是:

http://www.mediafire.com/?0hm40owj08y68p7

关于php - 调用未定义函数 curl_init(),但已启用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14232677/

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