霓小沫儿 发表于 2024-9-11 08:25:35

php运行出现Call to undefined function curl_init()

装好PHP后,执行类似$ch = curl_init();这样的语句,出现Call to undefined function curl_init()的错误提示。


解决方法如下:
1、在php.ini中找到extension=php_curl.dll,去掉前面的,php.ini一般在c:windows下面。
2、在php.ini中找到extension_dir = "ext",去掉前面的;,改为extension_dir = "C:php5ext"。
"C:php5ext"只是示例,即扩展指向的路径要对
3、php_curl.dll、libeay32.dll、ssleay32.dll、php5ts.dll都拷到system32下面去。
4、然后重启IIS。
页: [1]
查看完整版本: php运行出现Call to undefined function curl_init()