WAMP安装卷曲 [英] WAMP Curl installation

查看:136
本文介绍了WAMP安装卷曲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从注释php.ini文件以下

I have uncomment the following from the php.ini file

;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll

另外,我抄php_curl.dll到Windows \\ System32下,并重新启动Apache服务器。

Also ,I have copied the php_curl.dll to windows\system32 and restart the apache server.

我测试的脚本follwoing

I am testing the follwoing script

<?php

$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://example.com');
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);

if (empty($buffer))
{
    print "Sorry, example.com are a bunch of poopy-heads.<p>";
}
else
{
    print $buffer;
}
?>

和收到以下错误

Fatal error: Call to undefined function curl_init() in C:\wamp\www\t.php on line 3

任何帮助将AP preciated?

any help will be appreciated ?

推荐答案

请确保您注释掉从右边php.ini文件扩展名。您应该检查扩展是否通过启用的phpinfo()命令。

Make sure that you have uncommented the extension from the right php.ini file. You should check whether or not extension is enabled through phpinfo() command.

这篇关于WAMP安装卷曲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆