windows下PHP中Fatal error Call to undefined function curl_init()的解决方法

参考官方解决方法:http://nz.php.net/manual/en/curl.installation.php

1、php安装目录下的ext文件夹下面是否有php_curl.dll文件,然后右键->属性->详细信息,查看版本号是否和PHP版本一致;
2、php.ini文件;extension=php_curl.dll前面的";"去掉
如果以上方法还不行的话,请继续往下;
3、(如果是windows32位系统)复制 php_curl.dll, ssleay32.dll, libeay32.dll 到system32目录下
4、复制 libssh2.dll 到 Apache24in 目录下,然后重启服务


Note: Note to Win32 Users
In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH. You don't need libcurl.dll from the cURL site.

I had to also also copy libssh2.dll into my Apache24 folder for this to work with my PHP 5.6.2 installation. So altogether I had to do the following:

Move to Windowssystem32 folder:
libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll

Move to Apache24in folder
libssh2.dll

Uncomment extension=php_curl.dll

原文地址:https://www.cnblogs.com/rnckty/p/4112807.html