" /> 久久久久久久久久久久电影,久久影院100000精品,亚洲最大av网

色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

php運(yùn)行出現(xiàn)Call to undefined function curl_init()的解決方法

在網(wǎng)上下載了一個(gè)模擬登陸discuz論壇的php程序范例,試運(yùn)行時(shí)出現(xiàn)“Call to undefined function curl_init”這個(gè)錯(cuò)誤提示,沒有定義的函數(shù),也就是php還沒打開對(duì)curl_init函數(shù)的支持。Google了一番終于解決了,方法如下:

  以windows下的php+apache為例。

  首先,打開php.ini,找到“extension=php_curl.dll”,然后去掉前面的“;”注釋,重啟apache即可。

  如果還出現(xiàn)此類問題,先檢查php.ini的extension_dir值是哪個(gè)目錄,在那個(gè)目錄下檢查有無php_curl.dll,沒有的話請(qǐng)下載php_curl.dll,再把php目錄中的libeay32.dll和ssleay32.dll拷到c:/windows/system32里面,重啟apache,OK!

在Ubuntu 下運(yùn)行php,總是提示Call to undefined function curl_init(),原因沒有安轉(zhuǎn):php5-curl

與curl相關(guān)的內(nèi)容見:http://packages.ubuntu.com/zh-cn/intrepid/php5-curl

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.

H1>

(php 4 >= 4.0.2)

curl_init -- 初始化一個(gè)CURL會(huì)話

描述  

int curl_init ([string url])  

curl_init()函數(shù)將初始化一個(gè)新的會(huì)話,返回一個(gè)CURL句柄供curl_setopt(), curl_exec(),和 curl_close() 函數(shù)使用。如果可選參數(shù)被提供,那么CURLOPT_URL選項(xiàng)將被設(shè)置成這個(gè)參數(shù)的值。你可以使用curl_setopt()函數(shù)人工設(shè)置。
例 1. 初始化一個(gè)新的CURL會(huì)話,且取回一個(gè)網(wǎng)頁(yè)

<?php
$ch = curl_init();

curl_setopt ($ch, CURLOPT_URL, "http://www.zend.com/");
curl_setopt ($ch, CURLOPT_HEADER, 0);

curl_exec ($ch);

curl_close ($ch);
?>


參見:curl_close(), curl_setopt()

php技術(shù)php運(yùn)行出現(xiàn)Call to undefined function curl_init()的解決方法,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 双桥区| 乾安县| 锦州市| 什邡市| 商水县| 边坝县| 长岭县| 文山县| 黑龙江省| 边坝县| 吉木萨尔县| 都江堰市| 博罗县| 新乡市| 吕梁市| 都江堰市| 绍兴市| 施甸县| 手游| 清镇市| 密山市| 五原县| 河曲县| 尉氏县| 玉环县| 江孜县| 新源县| 中阳县| 卓资县| 惠东县| 昆山市| 铜川市| 淮阳县| 拉萨市| 沂南县| 平顺县| 岢岚县| 建平县| 云梦县| 德保县| 廉江市|