教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 windows 下 php curl 的支持配置方法

windows 下 php curl 的支持配置方法

发布时间:2018-11-10   编辑:jiaochengji.com
教程集为您提供windows 下 php curl 的支持配置方法等资源,欢迎您收藏本站,我们将为您提供最新的windows 下 php curl 的支持配置方法资源
如果我们安装了php环境但在测试用curl_init()时提示Fatal error: Call to undefined function: curl_init(),这个是证明我们curl没有配置好,下面我来介绍介绍。

调用curl_init()函数测试,出现错误提示如下:
 
Fatal error: Call to undefined function: curl_init()

windowsxp 2003

首先保证你的php已经可以使用,本文不讲解windows下的php配置,只是增加curl的扩展。
1、拷贝PHP目录中的libeay32.dll 和 ssleay32.dll 两个文件到 c:/windows/system32 目录。
2、修改php.ini。去掉 extension = php_curl.dll 前面的分号。
3、重启apache
完成!


windows 7/8/vasta

■You will need to change the extension_dir setting to point to the directory where your extensions lives, or where you have placed your php_*.dll files. For example:

<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy3889')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy3889>

extension_dir = C:phpextensions


■Enable the extension(s) in php.ini you want to use by uncommenting the extension=php_*.dll lines in php.ini. This is done by deleting the leading ; from the extension you want to load.

Example #1 Enable Bzip2 extension for PHP-Windows

<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy9362')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy9362>

// change the following line from ...
;extension=php_bz2.dll

// ... to
extension=php_bz2.dll

您可能感兴趣的文章:
curl是php自带的吗
php中开启curl扩展的方法详解
curl模拟http请求范例详析
php中的curl使用心得详解
php curl库用法简介
php如何使用curl?(用法介绍)
php:Call to undefined function curl_init()的解决方法
php curl采集站外内容示例代码
php curl超时设置详解
php下载css中图片函数

[关闭]
~ ~