php運(yùn)行出現(xiàn)Call to undefined function curl_init()
2016-07-01 07:04:4112573
curl_init -- 初始化一個(gè)CURL會(huì)話,如果提示Call to undefined function curl_init那么需要如下操作即可。
在網(wǎng)上下載了一個(gè)模擬登陸discuz論壇的php程序范例,試運(yùn)行時(shí)出現(xiàn)“Call to undefined function curl_init”這個(gè)錯(cuò)誤提示,沒(méi)有定義的函數(shù),也就是php還沒(méi)打開(kāi)對(duì)curl_init函數(shù)的支持。Google了一番終于解決了,方法如下:
系統(tǒng)環(huán)境,WIN2003 IIS6,PHP版本5.2.12 在裝好PHP后,執(zhí)?類(lèi)似$ch = curl_init();這樣的語(yǔ)句,出現(xiàn)Call to undefined function curl_init()的錯(cuò)誤提示。
CURL is a library for getting files from FTP, GOPHER, HTTP server.
PHP5 is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dinamically generated pages quickly. This version of PHP5 was built with the Suhosin patch.