php 调用未定义的函数 curl_init()
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10226983/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Call to undefined function curl_init()
提问by Adeel Kamal
Possible Duplicate:
curl_init() function not working
可能重复:
curl_init() 函数不起作用
I am using PHP for accessing the Foursquare API. I have set up everything for the authentication with Foursquare. But as soon as I click on the "Allow" button, my callback.php gives me the following error:
我正在使用 PHP 来访问 Foursquare API。我已经为 Foursquare 的身份验证设置了一切。但是一旦我点击“允许”按钮,我的 callback.php 就会出现以下错误:
Fatal error: Call to undefined function curl_init() in C:\wamp\www\EpiFoursquare.php on line 119
Call Stack
Time Memory Function Location
0.0007 372592 {main}( ) ..\callback.php:0
0.0039 571896 EpiFoursquare->getAccessToken( ) ..\callback.php:17
0.0040 572928 EpiFoursquare->request( ) ..\EpiFoursquare.php:31
Where does this error come from? I cannot find the origin. Please help me out.
这个错误从何而来?我找不到原点。请帮帮我。
回答by zerkms
You need to initialize the cURL extension: http://php.net/manual/en/curl.installation.php
您需要初始化 cURL 扩展:http: //php.net/manual/en/curl.installation.php
回答by FlatLander
- remove
;fromextension=php_curl.dllinphp.ini; - ensure that
ssleay32.dllandlibeay32.dllare inWindows/system32; - copy
php_curl.dllintoWindows\System32as well.
- 除去
;从extension=php_curl.dll处于php.ini; - 确保
ssleay32.dll和libeay32.dll在Windows/system32; - 也复制
php_curl.dll进去Windows\System32。
This worked for me!
这对我有用!

