免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3784 | 回复: 2
打印 上一主题 下一主题

Call to undefined function: curl_init() in.... [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-27 22:06 |只看该作者 |倒序浏览


  1. PHP Version 4.3.4

  2. curl_init
  3. (PHP 4 >= 4.0.2, PHP 5)

  4. curl_init -- Initialize a CURL session
  5. Description
  6. resource curl_init ( [string url] )


  7. The curl_init() will initialize a new session and return a CURL handle for use with the curl_setopt(), curl_exec(), and curl_close() functions. If the optional url parameter is supplied then the CURLOPT_URL option will be set to the value of the parameter. You can manually set this using the curl_setopt() function. 例子 1. Initializing a new CURL session and fetching a webpage

  8. <?php
  9. // create a new curl resource
  10. $ch = curl_init();

  11. // set URL and other appropriate options
  12. curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
  13. curl_setopt($ch, CURLOPT_HEADER, 0);

  14. // grab URL and pass it to the browser
  15. curl_exec($ch);

  16. // close curl resource, and free up system resources
  17. curl_close($ch);
  18. ?>  



复制代码


这段代码,我测试执行时出现这样的错误:
Fatal error: Call to undefined function: curl_init() in d:\appserv\www\test\curl.php on line 4

怎么回事呢

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2006-11-27 22:16 |只看该作者
看手册看手册,这curl的说明最开始的部分。

论坛徽章:
0
3 [报告]
发表于 2006-11-28 11:54 |只看该作者
要加载curl库吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP